Publish an immutable agent version from a completed artifact.
curl --request POST \
--url https://api.example.com/v1/agent-versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.example.com/v1/agent-versions"
payload = { "artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({artifact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.example.com/v1/agent-versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ok": true
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}Artifacts
Create Agent Version
Create an immutable agent version from an artifact.
POST
/
v1
/
agent-versions
Publish an immutable agent version from a completed artifact.
curl --request POST \
--url https://api.example.com/v1/agent-versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.example.com/v1/agent-versions"
payload = { "artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({artifact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.example.com/v1/agent-versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ok": true
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}Use this route after completing an artifact upload.
Authorizations
droydApiKeyBearerdroydApiKeyHeader
A Droyd API key in the Authorization Bearer slot.
Body
application/json
Response
Successful response.
Was this page helpful?
