Operations (sample payloads)
Main operationsCopy
Copy
DELETECopy
Copy
Send a DELETE request.
Sample Input
1{2"url": "https://api.example.com/users/123",3"auth": {4"basic_auth": {5"username": "apiuser",6"password": "secretpassword"7}8},9"headers": [10{11"key": "Content-Type",12"value": "application/json"13}14],15"status_code": {16"range": {17"from": 200,18"to": 20419}20},21"parse_response": "json"22}
Sample Output
1{2"response": {3"status_code": 204,4"headers": {5"Content-Type": "application/json",6"Date": "Wed, 15 Mar 2023 10:30:45 GMT",7"Server": "nginx/1.18.0"8},9"body": null10}11}
GETCopy
Copy
Send a GET request.
Sample Input
1{2"url": "https://api.example.com/users",3"auth": {4"basic_auth": {5"username": "apiuser",6"password": "secretpassword"7}8},9"headers": [10{11"key": "Accept",12"value": "application/json"13}14],15"queries": [16{17"key": "limit",18"value": "10"19},20{21"key": "offset",22"value": "0"23}24],25"follow_redirect": true,26"parse_response": "true",27"status_code": {28"range": {29"from": 200,30"to": 29931}32}33}
Sample Output
1{2"response": {3"status_code": 200,4"headers": {5"Content-Type": "application/json",6"X-RateLimit-Limit": "100",7"X-RateLimit-Remaining": "99"8},9"body": {10"users": [11{12"id": 1,13"name": "John Doe",14"email": "john.doe@example.com"15},16{17"id": 2,18"name": "Jane Smith",19"email": "jane.smith@example.com"20}21],22"total": 2,23"limit": 10,24"offset": 025}26}27}
HEADCopy
Copy
Send a HEAD request.
Sample Input
1{2"url": "https://api.example.com/users",3"auth": {4"basic_auth": {5"username": "apiuser",6"password": "secretpassword"7}8},9"headers": [10{11"key": "Accept",12"value": "application/json"13},14{15"key": "User-Agent",16"value": "Tray.io-Connector"17}18],19"queries": [20{21"key": "limit",22"value": "10"23}24],25"follow_redirect": true,26"reject_unauthorized": true,27"status_code": {28"range": {29"from": 200,30"to": 29931}32}33}
Sample Output
1{2"response": {3"status_code": 200,4"headers": "Content-Type: application/json\nContent-Length: 1234\nServer: nginx/1.18.0\nDate: Mon, 15 May 2023 10:30:45 GMT\nConnection: keep-alive\nAccess-Control-Allow-Origin: *\nCache-Control: no-cache, no-store, must-revalidate"5}6}
PATCHCopy
Copy
Send a PATCH request.
Sample Input
1{2"url": "https://api.example.com/users/123",3"auth": {4"basic_auth": {5"username": "apiuser",6"password": "secretpassword"7}8},9"headers": [10{11"key": "Content-Type",12"value": "application/json"13}14],15"body": {16"raw": {17"name": "John Doe",18"email": "johndoe@example.com"19}20},21"status_code": {22"range": {23"from": 200,24"to": 20425}26}27}
Sample Output
1{2"response": {3"status_code": 200,4"headers": {5"Content-Type": "application/json",6"Date": "Wed, 15 Mar 2023 10:30:00 GMT",7"Server": "nginx/1.18.0"8},9"body": {10"id": 123,11"name": "John Doe",12"email": "johndoe@example.com",13"updated_at": "2023-03-15T10:30:00Z"14}15}16}
POSTCopy
Copy
Send a POST request.
Sample Input
1{2"url": "https://api.example.com/users",3"auth": {4"basic_auth": {5"username": "myusername",6"password": "mypassword"7}8},9"headers": [10{11"key": "Content-Type",12"value": "application/json"13}14],15"body": {16"raw": {17"name": "John Doe",18"email": "john.doe@example.com",19"age": 3020}21},22"status_code": {23"range": {24"from": 200,25"to": 29926}27},28"parse_response": "true"29}
Sample Output
1{2"response": {3"status_code": 201,4"headers": {5"Content-Type": "application/json",6"Location": "https://api.example.com/users/123"7},8"body": {9"id": 123,10"name": "John Doe",11"email": "john.doe@example.com",12"age": 30,13"created_at": "2023-05-10T14:30:00Z"14}15}16}
PUTCopy
Copy
Send a PUT request.
Sample Input
1{2"url": "https://api.example.com/users/123",3"auth": {4"basic_auth": {5"username": "apiuser",6"password": "secretpassword"7}8},9"headers": [10{11"key": "Content-Type",12"value": "application/json"13}14],15"body": {16"raw": {17"name": "John Doe",18"email": "john.doe@example.com",19"age": 3020}21},22"status_code": {23"range": {24"from": 200,25"to": 20426}27},28"parse_response": "true"29}
Sample Output
1{2"response": {3"status_code": 200,4"headers": {5"Content-Type": "application/json",6"Server": "nginx/1.18.0",7"Date": "Wed, 15 Mar 2023 10:30:45 GMT"8},9"body": {10"id": 123,11"name": "John Doe",12"email": "john.doe@example.com",13"age": 30,14"updated_at": "2023-03-15T10:30:45Z"15}16}17}
DDL operationsCopy
Copy
List content types (DDL)Copy
Copy
Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping
Sample Input
1{2"url": "https://api.example.com/content-types"3}
Sample Output
1{2"contentTypes": [3{4"id": "article",5"name": "Article",6"fields": [7{8"id": "title",9"type": "string",10"required": true11},12{13"id": "body",14"type": "text",15"required": true16},17{18"id": "author",19"type": "string",20"required": false21},22{23"id": "publishDate",24"type": "date",25"required": true26}27]28},29{30"id": "product",31"name": "Product",32"fields": [33{34"id": "name",35"type": "string",36"required": true37},38{39"id": "description",40"type": "text",41"required": false42},43{44"id": "price",45"type": "number",46"required": true47},48{49"id": "inStock",50"type": "boolean",51"required": true52}53]54}55]56}