Perform Batch Operations on Endpoints - Cognigy Documentation
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
PATCH
/v2.0/endpoints
Perform Batch Operations on Endpoints
cURL
curl --request PATCH \
--url https://api-trial.cognigy.ai/new/v2.0/endpoints \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"operations": [\
{\
"op": "delete",\
"id": "<string>"\
}\
]
}
'```
**Python**
```python
import requests
url = "https://api-trial.cognigy.ai/new/v2.0/endpoints"
payload = { "operations": [\
{\
"op": "delete",\
"id": "<string>"\
}\
] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)
JavaScript
const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({operations: [{op: 'delete', id: '<string>'}]})
};
fetch('https://api-trial.cognigy.ai/new/v2.0/endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
Responses
200
{ "created": [\ "<string>"\ ], "updated": [\ "<string>"\ ], "deleted": [\ "<string>"\ ] }400
{ "type": "Bad Request", "title": "Bad Request Error", "status": 400, "detail": "Validation failed. Missing payload.", "instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432", "code": 1000, "traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f", "details": {} }401
{
"type": "Unauthorized",
"title": "Unauthorized Error",
"status": 401,
"detail": "<string>",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 401,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}
- 402
{
"type": "Payment Required",
"title": "Payment Required Error",
"status": 402,
"detail": "Validation failed. Missing payload.",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 402,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}
Authorizations
| Parameter | Required | Location |
|---|---|---|
| X-API-Key | Yes | Header |
Headers
- Accept: This header specifies the media type that the client expects in the response.
Available options:
application/jsonapplication/hal+jsonapplication/xmltext/xmltext/csv
Query Parameters
- projectId: The unique identifier for the Project.
- Required string length:
24 - Pattern:
^[a-z0-9]{24}$
- Required string length:
Body
- operations: An array of objects.