Create a supported agent-artifact upload intent.
curl --request POST \
--url https://api.example.com/v1/experiments/{id}/artifacts/upload-intents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"artifact_kind": "<string>",
"files": [
{
"relative_path": "<string>",
"size_bytes": 1,
"sha256": "<string>",
"mime_type": "<string>"
}
]
}
'import requests
url = "https://api.example.com/v1/experiments/{id}/artifacts/upload-intents"
payload = {
"artifact_kind": "<string>",
"files": [
{
"relative_path": "<string>",
"size_bytes": 1,
"sha256": "<string>",
"mime_type": "<string>"
}
]
}
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_kind: '<string>',
files: [
{
relative_path: '<string>',
size_bytes: 1,
sha256: '<string>',
mime_type: '<string>'
}
]
})
};
fetch('https://api.example.com/v1/experiments/{id}/artifacts/upload-intents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ok": true
}{
"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 Artifact Upload Intent
Create upload targets for an experiment artifact.
POST
/
v1
/
experiments
/
{id}
/
artifacts
/
upload-intents
Create a supported agent-artifact upload intent.
curl --request POST \
--url https://api.example.com/v1/experiments/{id}/artifacts/upload-intents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"artifact_kind": "<string>",
"files": [
{
"relative_path": "<string>",
"size_bytes": 1,
"sha256": "<string>",
"mime_type": "<string>"
}
]
}
'import requests
url = "https://api.example.com/v1/experiments/{id}/artifacts/upload-intents"
payload = {
"artifact_kind": "<string>",
"files": [
{
"relative_path": "<string>",
"size_bytes": 1,
"sha256": "<string>",
"mime_type": "<string>"
}
]
}
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_kind: '<string>',
files: [
{
relative_path: '<string>',
size_bytes: 1,
sha256: '<string>',
mime_type: '<string>'
}
]
})
};
fetch('https://api.example.com/v1/experiments/{id}/artifacts/upload-intents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ok": true
}{
"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 to request upload targets before uploading an agent artifact.
Authorizations
droydApiKeyBearerdroydApiKeyHeader
A Droyd API key in the Authorization Bearer slot.
Path Parameters
Body
application/json
Response
Successful response.
Was this page helpful?
⌘I
