Examples
Example: workspace-artifact
curl -X POST "https://api.buddy.works/workspaces/:workspace/artifacts" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "My Workspace Artifact",
"type": "CONTAINER",
"scope": "WORKSPACE"
}'Example: project-artifact
curl -X POST "https://api.buddy.works/workspaces/:workspace/artifacts" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "My Project Artifact",
"type": "CONTAINER",
"scope": "PROJECT",
"project": {
"name": "my-project"
}
}'Example: environment-artifact
curl -X POST "https://api.buddy.works/workspaces/:workspace/artifacts" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "My Environment Artifact",
"type": "BUCKET",
"scope": "ENVIRONMENT",
"environment": {
"id": "nZrnl40Y"
},
"sandboxes_access_level": "DENIED",
"allowed_environments": [
{
"project": "my-project",
"environment": "staging",
"access_level": "READ_ONLY"
}
]
}'Example: secure-artifact
curl -X POST "https://api.buddy.works/workspaces/:workspace/artifacts" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "Secure Artifact",
"type": "BUCKET",
"scope": "PROJECT",
"project": {
"name": "secure-project"
},
"authorization": {
"type": "BASIC",
"user": "apiuser",
"password": "example-password"
}
}'Example: gh-release-artifact
curl -X POST "https://api.buddy.works/workspaces/:workspace/artifacts" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "My GitHub Releases",
"type": "BUCKET",
"subtype": "GH_RELEASE",
"scope": "WORKSPACE",
"integration": {
"identifier": "my-github-integration"
},
"external_project_id": "my-org/my-repo",
"include_drafts": false,
"include_prereleases": true
}'EXAMPLE RESPONSE
{
"url": "https://api.buddy.works/workspaces/ttests/artifacts/x5169jL2",
"html_url": "https://app.buddy.works/ttests/-/artifacts/x5169jL2/versions",
"id": "x5169jL2",
"name": "My New Artifact",
"identifier": "my-new-artifact",
"type": "CONTAINER",
"project": {
"url": "https://api.buddy.works/workspaces/ttests/projects/my-project",
"html_url": "https://app.buddy.works/ttests/projects/my-project",
"name": "my-project",
"display_name": "My Project"
},
"scope": "PROJECT",
"authorization": {
"type": "BUDDY"
},
"permissions": {
"others": "READ_ONLY",
"users": [
{
"id": 42,
"access_level": "MANAGE"
}
]
},
"size": 1073741824,
"created_date": "2024-01-22T09:15:00Z",
"note": "Notes about this resource",
"agent_note": "my_custom_field: note for agent"
}STATUS
201 Artifact created successfully