> For the complete documentation index, see [llms.txt](https://docs.syntho.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.syntho.ai/syntho-api/syntho-rest-api/job-attachment.md).

# Job Attachment

## GET /api/v1/jobs/{job\_id}/attachment/{attachment\_type}/availability/

> Check whether a persisted job attachment is available without downloading it

```json
{"openapi":"3.0.3","info":{"title":"Syntho Backend API","version":"1.0.0 (v1)"},"servers":[{"url":"/"}],"security":[{"authentication":[]},{"OIDC":[]}],"components":{"securitySchemes":{"authentication":{"type":"apiKey","in":"cookie","name":"sessionid","description":"Log in using the <a href='/api/playground/#/Auth/auth_create'>POST /api/v1/auth/</a> endpoint"},"OIDC":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"JobAttachmentAvailabilitySchema":{"properties":{"available":{"title":"Available","type":"boolean"}},"required":["available"],"title":"JobAttachmentAvailabilitySchema","type":"object"},"HTTPValidationError":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Id"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Code"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"body":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Body"},"durability":{"anyOf":[{"$ref":"#/components/schemas/Durability"},{"type":"null"}],"default":"temporary"},"duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":5000,"title":"Duration"},"kind":{"anyOf":[{"$ref":"#/components/schemas/SystemMessageKind"},{"type":"null"}],"default":"info"},"details":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"default":null,"title":"Details"},"payload":{"default":null,"title":"Payload"},"action":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Action"},"display":{"anyOf":[{"$ref":"#/components/schemas/Display"},{"type":"null"}],"default":"notification"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Created At"}},"title":"HTTPValidationError","type":"object"},"Durability":{"enum":["transient","persistent","temporary"],"title":"Durability","type":"string"},"SystemMessageKind":{"enum":["success","error","warning","info"],"title":"SystemMessageKind","type":"string"},"Display":{"enum":["field","screen","notification"],"title":"Display","type":"string"}}},"paths":{"/api/v1/jobs/{job_id}/attachment/{attachment_type}/availability/":{"get":{"operationId":"jobs_attachment_availability_retrieve","description":"Check whether a persisted job attachment is available without downloading it","parameters":[{"in":"path","name":"attachment_type","schema":{"type":"string","enum":["CAPABILITY_ACTIVITY_RESULT","IMPORTED_ENGINE","LOG","PRIVACY_REPORT"]},"required":true},{"in":"path","name":"job_id","schema":{"type":"string"},"required":true}],"tags":["JobAttachment"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobAttachmentAvailabilitySchema"}}},"description":""},"403":{"description":"Permission denied"},"404":{"description":"Job not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation error"},"503":{"description":"Unable to check attachment in external service"}}}}}}
```

## GET /api/v1/jobs/{job\_id}/attachment/{attachment\_type}/download/

> Download a persisted job attachment

```json
{"openapi":"3.0.3","info":{"title":"Syntho Backend API","version":"1.0.0 (v1)"},"servers":[{"url":"/"}],"security":[{"authentication":[]},{"OIDC":[]}],"components":{"securitySchemes":{"authentication":{"type":"apiKey","in":"cookie","name":"sessionid","description":"Log in using the <a href='/api/playground/#/Auth/auth_create'>POST /api/v1/auth/</a> endpoint"},"OIDC":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"HTTPValidationError":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Id"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Code"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"body":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Body"},"durability":{"anyOf":[{"$ref":"#/components/schemas/Durability"},{"type":"null"}],"default":"temporary"},"duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":5000,"title":"Duration"},"kind":{"anyOf":[{"$ref":"#/components/schemas/SystemMessageKind"},{"type":"null"}],"default":"info"},"details":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"default":null,"title":"Details"},"payload":{"default":null,"title":"Payload"},"action":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Action"},"display":{"anyOf":[{"$ref":"#/components/schemas/Display"},{"type":"null"}],"default":"notification"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Created At"}},"title":"HTTPValidationError","type":"object"},"Durability":{"enum":["transient","persistent","temporary"],"title":"Durability","type":"string"},"SystemMessageKind":{"enum":["success","error","warning","info"],"title":"SystemMessageKind","type":"string"},"Display":{"enum":["field","screen","notification"],"title":"Display","type":"string"}}},"paths":{"/api/v1/jobs/{job_id}/attachment/{attachment_type}/download/":{"get":{"operationId":"jobs_attachment_download_retrieve","description":"Download a persisted job attachment","parameters":[{"in":"path","name":"attachment_type","schema":{"type":"string","enum":["CAPABILITY_ACTIVITY_RESULT","IMPORTED_ENGINE","LOG","PRIVACY_REPORT"]},"required":true},{"in":"path","name":"job_id","schema":{"type":"string"},"required":true}],"tags":["JobAttachment"],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"description":"Success: Job attachment"},"403":{"description":"Permission denied"},"404":{"description":"Job or attachment not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation error"},"503":{"description":"Unable to fetch attachment from external service"}}}}}}
```

## GET /api/v1/jobs/{job\_id}/attachments/

> List attachments

```json
{"openapi":"3.0.3","info":{"title":"Syntho Backend API","version":"1.0.0 (v1)"},"servers":[{"url":"/"}],"security":[{"authentication":[]},{"OIDC":[]}],"components":{"securitySchemes":{"authentication":{"type":"apiKey","in":"cookie","name":"sessionid","description":"Log in using the <a href='/api/playground/#/Auth/auth_create'>POST /api/v1/auth/</a> endpoint"},"OIDC":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"ListOfJobAttachmentSchema":{"properties":{"attachments":{"items":{"$ref":"#/components/schemas/JobAttachmentSchema"},"title":"Attachments","type":"array"}},"required":["attachments"],"title":"ListOfJobAttachmentSchema","type":"object"},"JobAttachmentSchema":{"properties":{"id":{"format":"uuid","title":"Id","type":"string"},"job_id":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"default":null,"title":"Job Id"},"type":{"$ref":"#/components/schemas/JobAttachmentType"},"created_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Created At"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Name"}},"required":["id","type"],"title":"JobAttachmentSchema","type":"object"},"JobAttachmentType":{"enum":["LOG","PRIVACY_REPORT","IMPORTED_ENGINE","CAPABILITY_ACTIVITY_RESULT"],"title":"JobAttachmentType","type":"string"},"HTTPValidationError":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Id"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Code"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"body":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Body"},"durability":{"anyOf":[{"$ref":"#/components/schemas/Durability"},{"type":"null"}],"default":"temporary"},"duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":5000,"title":"Duration"},"kind":{"anyOf":[{"$ref":"#/components/schemas/SystemMessageKind"},{"type":"null"}],"default":"info"},"details":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"default":null,"title":"Details"},"payload":{"default":null,"title":"Payload"},"action":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Action"},"display":{"anyOf":[{"$ref":"#/components/schemas/Display"},{"type":"null"}],"default":"notification"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Created At"}},"title":"HTTPValidationError","type":"object"},"Durability":{"enum":["transient","persistent","temporary"],"title":"Durability","type":"string"},"SystemMessageKind":{"enum":["success","error","warning","info"],"title":"SystemMessageKind","type":"string"},"Display":{"enum":["field","screen","notification"],"title":"Display","type":"string"}}},"paths":{"/api/v1/jobs/{job_id}/attachments/":{"get":{"operationId":"attachments_list","description":"List attachments","parameters":[{"in":"path","name":"job_id","schema":{"type":"string"},"required":true}],"tags":["JobAttachment"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOfJobAttachmentSchema"}}},"description":"Success: Attachment list"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation error"},"503":{"description":"Message: unable to fetch attachment from external service"}}}}}}
```

## GET /api/v1/jobs/attachment/{attachment\_id}/

> Get attachment metadata by id

```json
{"openapi":"3.0.3","info":{"title":"Syntho Backend API","version":"1.0.0 (v1)"},"servers":[{"url":"/"}],"security":[{"authentication":[]},{"OIDC":[]}],"components":{"securitySchemes":{"authentication":{"type":"apiKey","in":"cookie","name":"sessionid","description":"Log in using the <a href='/api/playground/#/Auth/auth_create'>POST /api/v1/auth/</a> endpoint"},"OIDC":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"JobAttachmentSchema":{"properties":{"id":{"format":"uuid","title":"Id","type":"string"},"job_id":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"default":null,"title":"Job Id"},"type":{"$ref":"#/components/schemas/JobAttachmentType"},"created_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Created At"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Name"}},"required":["id","type"],"title":"JobAttachmentSchema","type":"object"},"JobAttachmentType":{"enum":["LOG","PRIVACY_REPORT","IMPORTED_ENGINE","CAPABILITY_ACTIVITY_RESULT"],"title":"JobAttachmentType","type":"string"},"HTTPValidationError":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Id"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Code"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Title"},"body":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Body"},"durability":{"anyOf":[{"$ref":"#/components/schemas/Durability"},{"type":"null"}],"default":"temporary"},"duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":5000,"title":"Duration"},"kind":{"anyOf":[{"$ref":"#/components/schemas/SystemMessageKind"},{"type":"null"}],"default":"info"},"details":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"default":null,"title":"Details"},"payload":{"default":null,"title":"Payload"},"action":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Action"},"display":{"anyOf":[{"$ref":"#/components/schemas/Display"},{"type":"null"}],"default":"notification"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Created At"}},"title":"HTTPValidationError","type":"object"},"Durability":{"enum":["transient","persistent","temporary"],"title":"Durability","type":"string"},"SystemMessageKind":{"enum":["success","error","warning","info"],"title":"SystemMessageKind","type":"string"},"Display":{"enum":["field","screen","notification"],"title":"Display","type":"string"}}},"paths":{"/api/v1/jobs/attachment/{attachment_id}/":{"get":{"operationId":"jobs_attachment_retrieve","description":"Get attachment metadata by id","parameters":[{"in":"path","name":"attachment_id","schema":{"type":"string"},"required":true}],"tags":["JobAttachment"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobAttachmentSchema"}}},"description":"Success: Attachment details"},"404":{"description":"Attachment not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation error"},"503":{"description":"Message: unable to fetch attachment from external service"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.syntho.ai/syntho-api/syntho-rest-api/job-attachment.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
