Apply draft changes
curl --request POST \
--url https://api.zelinqa.ai/v1/configuration/changes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"changes": [
{
"entity": "objective",
"operation": "update",
"objective": {
"name": "<string>",
"max_turns": 50,
"candidates_per_call": 5,
"order_strength": 0.5
}
}
],
"expected_draft_revision": 1
}
'import requests
url = "https://api.zelinqa.ai/v1/configuration/changes"
payload = {
"changes": [
{
"entity": "objective",
"operation": "update",
"objective": {
"name": "<string>",
"max_turns": 50,
"candidates_per_call": 5,
"order_strength": 0.5
}
}
],
"expected_draft_revision": 1
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
changes: [
{
entity: 'objective',
operation: 'update',
objective: {name: '<string>', max_turns: 50, candidates_per_call: 5, order_strength: 0.5}
}
],
expected_draft_revision: 1
})
};
fetch('https://api.zelinqa.ai/v1/configuration/changes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"request_id": "<string>",
"draft_revision": 1,
"applied": 1,
"warnings": [
{
"code": "<string>",
"message": "<string>",
"entity": "objective",
"entity_id": "<string>",
"change_index": 1
}
]
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}Configuration
Apply draft changes
Atomically apply an ordered batch of changes to the configuration draft.
POST
/
v1
/
configuration
/
changes
Apply draft changes
curl --request POST \
--url https://api.zelinqa.ai/v1/configuration/changes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"changes": [
{
"entity": "objective",
"operation": "update",
"objective": {
"name": "<string>",
"max_turns": 50,
"candidates_per_call": 5,
"order_strength": 0.5
}
}
],
"expected_draft_revision": 1
}
'import requests
url = "https://api.zelinqa.ai/v1/configuration/changes"
payload = {
"changes": [
{
"entity": "objective",
"operation": "update",
"objective": {
"name": "<string>",
"max_turns": 50,
"candidates_per_call": 5,
"order_strength": 0.5
}
}
],
"expected_draft_revision": 1
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
changes: [
{
entity: 'objective',
operation: 'update',
objective: {name: '<string>', max_turns: 50, candidates_per_call: 5, order_strength: 0.5}
}
],
expected_draft_revision: 1
})
};
fetch('https://api.zelinqa.ai/v1/configuration/changes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"request_id": "<string>",
"draft_revision": 1,
"applied": 1,
"warnings": [
{
"code": "<string>",
"message": "<string>",
"entity": "objective",
"entity_id": "<string>",
"change_index": 1
}
]
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"code": "unauthorized",
"message": "<string>",
"request_id": "<string>",
"details": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Required string length:
8 - 128Body
application/json