# Exports

## Retrieve an export

> Get details of a specific export record by ID.

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"id_path":{"name":"id","in":"path","description":"Unique identifier of the resource","required":true,"schema":{"type":"integer"}}},"schemas":{"Export":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true,"description":"Unique identifier for the export."},"action_name":{"type":"string","nullable":true,"maxLength":255,"description":"Name of the export action."},"collected_count":{"type":"integer","format":"int32","default":0,"description":"Number of records collected for the export."},"error_message":{"type":"string","nullable":true},"fail_count":{"type":"integer","format":"int32","default":0,"description":"Number of records that failed to export."},"filter_file":{"type":"string","format":"binary","nullable":true,"description":"Path to the uploaded filter file."},"format_type":{"type":"string","enum":["csv","xls","json"],"default":"csv","description":"File format for the export."},"language":{"type":"string","maxLength":8,"description":"Language code for the export."},"last_instance_id":{"type":"integer","format":"int32","default":0,"description":"ID of the last record exported."},"page":{"type":"integer","format":"int32","default":1,"description":"Current page number for the export."},"request_fields":{"type":"array","items":{"type":"string"},"description":"List of fields requested for the export."},"request_path":{"type":"string","description":"API path to request data for the export."},"requested_by":{"type":"string","format":"uuid","description":"ID of the user who requested the export."},"result_file":{"type":"string","nullable":true,"maxLength":512,"description":"Path or URL to the result file."},"total_count":{"type":"integer","format":"int32","default":0,"description":"Total number of records to be exported."},"status":{"type":"string","enum":["waiting","waiting_next_page","processing","completed","failed","cancelled","preparing_file_creation"],"default":"waiting"},"uploaded_parts":{"type":"array","items":{"type":"string"},"description":"List of uploaded file parts."},"viewset":{"type":"string","nullable":true,"maxLength":255,"description":"The name of the viewset associated with the export."},"created_date":{"type":"string","format":"date-time","description":"Creation Date"},"modified_date":{"type":"string","format":"date-time","description":"Last Modification Date"}}}},"responses":{"404":{"description":"The given resource or object was not found or does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"description":"Contains a detailed description of the error.","type":"string"}}}}}}}},"paths":{"/api/v1/exports/{id}/":{"get":{"summary":"Retrieve an export","description":"Get details of a specific export record by ID.","tags":["Exports"],"parameters":[{"$ref":"#/components/parameters/id_path"}],"responses":{"200":{"description":"Export details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Export"}}}},"404":{"$ref":"#/components/responses/404"}}}}}}
```

## List exports

> Retrieve a list of export records with optional filtering. Non-superusers can only see their own records.

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"created_date":{"name":"created_date","in":"query","required":false,"description":"Filter by creation date using supported lookup expressions (e.g., `gt`, `gte`, `lt`, `lte`, `date__gt`, etc.).","schema":{"type":"string","format":"date-time"}},"status":{"name":"status","in":"query","required":false,"description":"Filter by the export status.","schema":{"type":"string","enum":["pending","processing","completed","failed"]}},"format_type":{"name":"format_type","in":"query","required":false,"description":"Filter by the export file format.","schema":{"type":"string","enum":["csv","json","xml"]}}},"schemas":{"Export":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true,"description":"Unique identifier for the export."},"action_name":{"type":"string","nullable":true,"maxLength":255,"description":"Name of the export action."},"collected_count":{"type":"integer","format":"int32","default":0,"description":"Number of records collected for the export."},"error_message":{"type":"string","nullable":true},"fail_count":{"type":"integer","format":"int32","default":0,"description":"Number of records that failed to export."},"filter_file":{"type":"string","format":"binary","nullable":true,"description":"Path to the uploaded filter file."},"format_type":{"type":"string","enum":["csv","xls","json"],"default":"csv","description":"File format for the export."},"language":{"type":"string","maxLength":8,"description":"Language code for the export."},"last_instance_id":{"type":"integer","format":"int32","default":0,"description":"ID of the last record exported."},"page":{"type":"integer","format":"int32","default":1,"description":"Current page number for the export."},"request_fields":{"type":"array","items":{"type":"string"},"description":"List of fields requested for the export."},"request_path":{"type":"string","description":"API path to request data for the export."},"requested_by":{"type":"string","format":"uuid","description":"ID of the user who requested the export."},"result_file":{"type":"string","nullable":true,"maxLength":512,"description":"Path or URL to the result file."},"total_count":{"type":"integer","format":"int32","default":0,"description":"Total number of records to be exported."},"status":{"type":"string","enum":["waiting","waiting_next_page","processing","completed","failed","cancelled","preparing_file_creation"],"default":"waiting"},"uploaded_parts":{"type":"array","items":{"type":"string"},"description":"List of uploaded file parts."},"viewset":{"type":"string","nullable":true,"maxLength":255,"description":"The name of the viewset associated with the export."},"created_date":{"type":"string","format":"date-time","description":"Creation Date"},"modified_date":{"type":"string","format":"date-time","description":"Last Modification Date"}}}},"responses":{"403":{"description":"Forbidden"}}},"paths":{"/api/v1/exports/":{"get":{"summary":"List exports","description":"Retrieve a list of export records with optional filtering. Non-superusers can only see their own records.","tags":["Exports"],"parameters":[{"$ref":"#/components/parameters/created_date"},{"$ref":"#/components/parameters/status"},{"$ref":"#/components/parameters/format_type"}],"responses":{"200":{"description":"A list of exports.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Export"}}}}},"403":{"$ref":"#/components/responses/403"}}}}}}
```

## Set export as cancelled

> Mark an export record as cancelled. Only accessible by superusers.

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"id_path":{"name":"id","in":"path","description":"Unique identifier of the resource","required":true,"schema":{"type":"integer"}}},"schemas":{"Export":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true,"description":"Unique identifier for the export."},"action_name":{"type":"string","nullable":true,"maxLength":255,"description":"Name of the export action."},"collected_count":{"type":"integer","format":"int32","default":0,"description":"Number of records collected for the export."},"error_message":{"type":"string","nullable":true},"fail_count":{"type":"integer","format":"int32","default":0,"description":"Number of records that failed to export."},"filter_file":{"type":"string","format":"binary","nullable":true,"description":"Path to the uploaded filter file."},"format_type":{"type":"string","enum":["csv","xls","json"],"default":"csv","description":"File format for the export."},"language":{"type":"string","maxLength":8,"description":"Language code for the export."},"last_instance_id":{"type":"integer","format":"int32","default":0,"description":"ID of the last record exported."},"page":{"type":"integer","format":"int32","default":1,"description":"Current page number for the export."},"request_fields":{"type":"array","items":{"type":"string"},"description":"List of fields requested for the export."},"request_path":{"type":"string","description":"API path to request data for the export."},"requested_by":{"type":"string","format":"uuid","description":"ID of the user who requested the export."},"result_file":{"type":"string","nullable":true,"maxLength":512,"description":"Path or URL to the result file."},"total_count":{"type":"integer","format":"int32","default":0,"description":"Total number of records to be exported."},"status":{"type":"string","enum":["waiting","waiting_next_page","processing","completed","failed","cancelled","preparing_file_creation"],"default":"waiting"},"uploaded_parts":{"type":"array","items":{"type":"string"},"description":"List of uploaded file parts."},"viewset":{"type":"string","nullable":true,"maxLength":255,"description":"The name of the viewset associated with the export."},"created_date":{"type":"string","format":"date-time","description":"Creation Date"},"modified_date":{"type":"string","format":"date-time","description":"Last Modification Date"}}}},"responses":{"403":{"description":"Forbidden"},"404":{"description":"The given resource or object was not found or does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"description":"Contains a detailed description of the error.","type":"string"}}}}}}}},"paths":{"/api/v1/exports/{id}/set_cancel/":{"post":{"summary":"Set export as cancelled","description":"Mark an export record as cancelled. Only accessible by superusers.","tags":["Exports"],"parameters":[{"$ref":"#/components/parameters/id_path"}],"responses":{"200":{"description":"Export successfully cancelled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Export"}}}},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.akinon.com/omnitron-openapis/exports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
