Artifacts
Request an upload URL for a draft artifact or download an artifact associated with a task.
/spaces/{spaceId}/pipelines/{pipelineName}/draft/artifacts/uploadsPOSTGet a signed upload URL for a draft artifact.
Sample request
POST /spaces/space_123/pipelines/web/draft/artifacts/uploads HTTP/1.1 Host: api.munchii.com Authorization: Bearer <access-token> Content-Type: application/json { "name": "bundle", "size": 2048, "sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef", "contentType": "application/tar+gzip" }Example response
HTTP/1.1 200 OK Content-Type: application/json { "data": { "uploadUrl": "https://storage.example.com/draft/bundle?<signature>", "uploadMethod": "PUT", "requiredHeaders": { "content-type": "application/tar+gzip", "content-length": "2048", "x-amz-checksum-sha256": "ASNFZ4mrze8BI0VniavN7wEjRWeJq83vASNFZ4mrze8=" } } }Common errors
400The artifact metadata, content type, size, or SHA-256 checksum is invalid.401The credentials are missing, expired, or invalid.403The caller lacks permission for this operation.404The space or pipeline was not found.
/tasks/{taskId}/artifacts/{artifactName}/downloadGETGet a signed download URL for a named artifact associated with the task.
Sample request
GET /tasks/task_123/artifacts/bundle/download HTTP/1.1 Host: api.munchii.com Authorization: Bearer <task-token>Example response
HTTP/1.1 200 OK Content-Type: application/json { "data": { "downloadUrl": "https://storage.example.com/releases/42/bundle?<signature>" } }Common errors
403The caller lacks permission for this operation.404The task or its artifact was not found.