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

  {
    "type": "Unauthorized",
    "title": "Unauthorized Error",
    "status": 401,
    "detail": "<string>",
    "instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
    "code": 401,
    "traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
    "details": {}
  }
  {
    "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

Available options:


Query Parameters


Body