Skip to main content
PATCH
/
api
/
v1
/
destinations
/
{slug}
/
cURL
curl --request PATCH \
  --url https://api.nekt.ai/api/v1/destinations/{slug}/ \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "draft": true,
  "active": true,
  "description": "<string>",
  "connector_config": "<unknown>",
  "input_tables": [
    {
      "table": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "fields": [
        "<string>"
      ],
      "primary_keys": [],
      "name_alias": "<string>",
      "field_mapping": "<unknown>"
    }
  ],
  "python_execution_cpu": 123,
  "python_execution_memory": 123,
  "trigger": null,
  "settings_number_of_retries": 123,
  "settings_retry_delay_seconds": 123,
  "settings_max_consecutive_failures": 123
}
'
import requests

url = "https://api.nekt.ai/api/v1/destinations/{slug}/"

payload = {
    "draft": True,
    "active": True,
    "description": "<string>",
    "connector_config": "<unknown>",
    "input_tables": [
        {
            "table": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "fields": ["<string>"],
            "primary_keys": [],
            "name_alias": "<string>",
            "field_mapping": "<unknown>"
        }
    ],
    "python_execution_cpu": 123,
    "python_execution_memory": 123,
    "trigger": None,
    "settings_number_of_retries": 123,
    "settings_retry_delay_seconds": 123,
    "settings_max_consecutive_failures": 123
}
headers = {
    "x-api-key": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'PATCH',
  headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    draft: true,
    active: true,
    description: '<string>',
    connector_config: '<unknown>',
    input_tables: [
      {
        table: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
        fields: ['<string>'],
        primary_keys: [],
        name_alias: '<string>',
        field_mapping: '<unknown>'
      }
    ],
    python_execution_cpu: 123,
    python_execution_memory: 123,
    trigger: null,
    settings_number_of_retries: 123,
    settings_retry_delay_seconds: 123,
    settings_max_consecutive_failures: 123
  })
};

fetch('https://api.nekt.ai/api/v1/destinations/{slug}/', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.nekt.ai/api/v1/destinations/{slug}/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'draft' => true,
    'active' => true,
    'description' => '<string>',
    'connector_config' => '<unknown>',
    'input_tables' => [
        [
                'table' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
                'fields' => [
                                '<string>'
                ],
                'primary_keys' => [
                                
                ],
                'name_alias' => '<string>',
                'field_mapping' => '<unknown>'
        ]
    ],
    'python_execution_cpu' => 123,
    'python_execution_memory' => 123,
    'trigger' => null,
    'settings_number_of_retries' => 123,
    'settings_retry_delay_seconds' => 123,
    'settings_max_consecutive_failures' => 123
  ]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json",
    "x-api-key: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.nekt.ai/api/v1/destinations/{slug}/"

	payload := strings.NewReader("{\n  \"draft\": true,\n  \"active\": true,\n  \"description\": \"<string>\",\n  \"connector_config\": \"<unknown>\",\n  \"input_tables\": [\n    {\n      \"table\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n      \"fields\": [\n        \"<string>\"\n      ],\n      \"primary_keys\": [],\n      \"name_alias\": \"<string>\",\n      \"field_mapping\": \"<unknown>\"\n    }\n  ],\n  \"python_execution_cpu\": 123,\n  \"python_execution_memory\": 123,\n  \"trigger\": null,\n  \"settings_number_of_retries\": 123,\n  \"settings_retry_delay_seconds\": 123,\n  \"settings_max_consecutive_failures\": 123\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("x-api-key", "<api-key>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://api.nekt.ai/api/v1/destinations/{slug}/")
  .header("x-api-key", "<api-key>")
  .header("Content-Type", "application/json")
  .body("{\n  \"draft\": true,\n  \"active\": true,\n  \"description\": \"<string>\",\n  \"connector_config\": \"<unknown>\",\n  \"input_tables\": [\n    {\n      \"table\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n      \"fields\": [\n        \"<string>\"\n      ],\n      \"primary_keys\": [],\n      \"name_alias\": \"<string>\",\n      \"field_mapping\": \"<unknown>\"\n    }\n  ],\n  \"python_execution_cpu\": 123,\n  \"python_execution_memory\": 123,\n  \"trigger\": null,\n  \"settings_number_of_retries\": 123,\n  \"settings_retry_delay_seconds\": 123,\n  \"settings_max_consecutive_failures\": 123\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.nekt.ai/api/v1/destinations/{slug}/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"draft\": true,\n  \"active\": true,\n  \"description\": \"<string>\",\n  \"connector_config\": \"<unknown>\",\n  \"input_tables\": [\n    {\n      \"table\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n      \"fields\": [\n        \"<string>\"\n      ],\n      \"primary_keys\": [],\n      \"name_alias\": \"<string>\",\n      \"field_mapping\": \"<unknown>\"\n    }\n  ],\n  \"python_execution_cpu\": 123,\n  \"python_execution_memory\": 123,\n  \"trigger\": null,\n  \"settings_number_of_retries\": 123,\n  \"settings_retry_delay_seconds\": 123,\n  \"settings_max_consecutive_failures\": 123\n}"

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "is_ml_ai_connector": true,
  "slug": "<string>",
  "archived": true,
  "deleted": true,
  "draft": true,
  "active": true,
  "status": "<string>",
  "deploy_failed": true,
  "deploy_failed_reason": "<string>",
  "connector_config": "<unknown>",
  "description": "<string>",
  "input_tables": [
    "<unknown>"
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "python_execution_cpu": 123,
  "python_execution_memory": 123,
  "settings_number_of_retries": 123,
  "settings_retry_delay_seconds": 123,
  "settings_max_consecutive_failures": 123,
  "connector_version": "<string>",
  "last_run": "<string>",
  "created_by": 123
}

Authorizations

x-api-key
string
header
required

API Key authentication. Format: 'x-api-key: api_key'

Path Parameters

slug
string
required

Body

draft
boolean
active
boolean
description
string
connector_config
any
input_tables
object[]
python_execution_cpu
integer
python_execution_memory
integer
trigger
unknown
settings_number_of_retries
integer
settings_retry_delay_seconds
integer
settings_max_consecutive_failures
integer | null

Response

200 - application/json

Serializer mixin: relabels the actor as "Nekt Support" for customer-facing output when the row was produced during a support impersonation session.

Add to any serializer whose model is an ImpersonationAttributedModel and that exposes created_by and/or triggered_by. The real user stays in the DB and the real agent stays in the ImpersonationSession audit trail.

The API contract is preserved: an EXPANDED actor field returns the full "Nekt Support" object, while an UNEXPANDED one returns the NEKT_SUPPORT_ID sentinel string — same scalar-id vs object shape as a normal user. We never return the real user's id here (the frontend would resolve it against the org and surface the impersonated customer instead of "Nekt Support").

id
string<uuid>
required
read-only
is_ml_ai_connector
boolean
required
read-only
slug
string
required
read-only
Pattern: ^[-a-zA-Z0-9_]+$
archived
boolean
required
read-only
deleted
boolean
required
read-only
draft
boolean
required
read-only
active
boolean
required
read-only
status
string
required
read-only
deploy_failed
boolean
required
read-only
deploy_failed_reason
string
required
read-only
connector_config
any
required
description
string
required
read-only
input_tables
any[]
required
read-only
created_at
string<date-time>
required
read-only
updated_at
string<date-time>
required
read-only
python_execution_cpu
integer
required
read-only
python_execution_memory
integer
required
read-only
settings_number_of_retries
integer
required
read-only

The number of times to retry a task in the settings if it fails

settings_retry_delay_seconds
integer
required
read-only

The number of seconds to retry a task in the settings if it fails

settings_max_consecutive_failures
integer | null
required
read-only

The maximum number of consecutive failures allowed before the settings is paused

connector_version
string
required
read-only

Connector version used by this destination (Expandable)

last_run
string
required
read-only

Last Run from this destination (Expandable)

created_by
integer
required
read-only

User that created this destination (Expandable)