> For the complete documentation index, see [llms.txt](https://developer.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.collibra.com/api/references/data-governance/files.md).

# Files

## Upload files

> Upload files

```json
{"openapi":"3.0.3","info":{"title":"Collibra Data Governance Center Core API","version":"2.0"},"servers":[{"url":"/rest/2.0","variables":{}}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"}},"schemas":{"FileUpload":{"type":"object","properties":{"file":{"type":"string","description":"File to upload","format":"binary"}}},"FileInfoImpl":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the file.","format":"uuid"},"name":{"type":"string","description":"The name of the file."},"contentType":{"type":"string","description":"The MIME type of the file content."},"size":{"type":"integer","description":"The size of the file.","format":"int64"},"extension":{"type":"string","description":"The extension of the file."}}}}},"paths":{"/files":{"post":{"tags":["Files"],"summary":"Upload files","description":"Upload files","operationId":"addFiles","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/FileUpload"}}}},"responses":{"201":{"description":"Files successfully uploaded.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileInfoImpl"}}}}}}}}}}
```

## Download a file

> Downloads file identified by given id.  Keep in mind to use GET /attachments/{attachmentId}/file instead of this endpoint when you want to get the file of an attachment.  A File and its id can be temporary so it's possible this endpoint will not get you the desired file.

```json
{"openapi":"3.0.3","info":{"title":"Collibra Data Governance Center Core API","version":"2.0"},"servers":[{"url":"/rest/2.0","variables":{}}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"}}},"paths":{"/files/{fileId}":{"get":{"tags":["Files"],"summary":"Download a file","description":"Downloads file identified by given id.  Keep in mind to use GET /attachments/{attachmentId}/file instead of this endpoint when you want to get the file of an attachment.  A File and its id can be temporary so it's possible this endpoint will not get you the desired file.","operationId":"getFile","parameters":[{"name":"fileId","in":"path","description":"the id of the file","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The file has been downloaded","content":{"application/json":{"schema":{"type":"string","description":"The found file","format":"binary"}}}}}}}}}
```

## Delete a file

> Deletes the temporary file with the provided ID. Temporary files are short-lived. Collibra automatically deletes them between 8 and 16 hours after their creation. You do not need specific permissions to perform this operation.

```json
{"openapi":"3.0.3","info":{"title":"Collibra Data Governance Center Core API","version":"2.0"},"servers":[{"url":"/rest/2.0","variables":{}}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"}}},"paths":{"/files/{fileId}":{"delete":{"tags":["Files"],"summary":"Delete a file","description":"Deletes the temporary file with the provided ID. Temporary files are short-lived. Collibra automatically deletes them between 8 and 16 hours after their creation. You do not need specific permissions to perform this operation.","operationId":"deleteFile","parameters":[{"name":"fileId","in":"path","description":"the id of the file","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The file has been deleted"}}}}}}
```

## Delete multiple files

> Deletes files that are older than the given time to live.

```json
{"openapi":"3.0.3","info":{"title":"Collibra Data Governance Center Core API","version":"2.0"},"servers":[{"url":"/rest/2.0","variables":{}}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"}}},"paths":{"/files/bulk":{"delete":{"tags":["Files"],"summary":"Delete multiple files","description":"Deletes files that are older than the given time to live.","operationId":"deleteFiles","parameters":[{"name":"timeToLive","in":"query","schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"The files have been deleted"}}}}}}
```

## Get file information

> Returns information about the file identified by given id. Keep in mind to use GET /attachments/{attachmentId} instead of this endpoint when you want to get information of an attachment. A File and its id can be temporary so it's possible this endpoint will not get you the information of the desired file.

```json
{"openapi":"3.0.3","info":{"title":"Collibra Data Governance Center Core API","version":"2.0"},"servers":[{"url":"/rest/2.0","variables":{}}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"}},"schemas":{"ScopeImpl":{"required":["id","resourceType"],"type":"object","properties":{"id":{"type":"string","description":"The id of the represented object (entity).","format":"uuid"},"createdBy":{"type":"string","description":"The id of the user that created this resource.","format":"uuid"},"createdOn":{"type":"integer","description":"The timestamp (in UTC time standard) of the creation of this resource.","format":"int64"},"lastModifiedBy":{"type":"string","description":"The id of the user who modified this resource the last time.","format":"uuid"},"lastModifiedOn":{"type":"integer","description":"The timestamp (in UTC time standard) of the last modification of this resource.","format":"int64"},"system":{"type":"boolean","description":"Whether this is a system resource or not."},"resourceType":{"type":"string","description":"The type of the resource, e.g. [Community, Asset, Domain, Attribute, Relation, WorkflowInstance, ...].\nThis property is deprecated and will be removed in the future. In order to stay backwards compatible\nand to enable introduction of new types of resources, where necessary, a resource discriminator\nproperty (of type String) has been added to specific subtypes of Resource,\ne.g. assignedResourceDiscriminator on AssignedResource, or attributeDiscriminator on Attribute.\nFor new types of resource that didn't exist before this change, the resourceType will be\nBaseDataType.\n","deprecated":true,"enum":["View","Asset","Community","Domain","AssetType","DomainType","Status","User","ClassificationMatch","UserGroup","Attribute","StringAttribute","ScriptAttribute","BooleanAttribute","DateAttribute","NumericAttribute","SingleValueListAttribute","MultiValueListAttribute","Comment","Attachment","Responsibility","Workflow","Job","Relation","RelationType","ComplexRelation","ComplexRelationType","ArticulationRule","Assignment","Scope","RelationTrace","ValidationRule","DataQualityRule","DataQualityMetric","Address","InstantMessagingAccount","Email","PhoneNumber","Website","Activity","FormProperty","WorkflowTask","ActivityChange","WorkflowInstance","Role","AttributeType","BooleanAttributeType","DateAttributeType","DateTimeAttributeType","MultiValueListAttributeType","NumericAttributeType","ScriptAttributeType","SingleValueListAttributeType","StringAttributeType","ViewSharingRule","ViewAssignmentRule","JdbcDriverFile","JdbcDriver","JdbcIngestionProperties","CsvIngestionProperties","ExcelIngestionProperties","ConnectionStringParameter","AssignedCharacteristicType","Notification","Tag","ComplexRelationLegType","ComplexRelationAttributeType","ComplexRelationLeg","BaseDataType","AdvancedDataType","DiagramPicture","DiagramPictureSharingRule","DiagramPictureAssignmentRule","Rating","Classification","PhysicalDataConnector","Context"]},"name":{"type":"string","description":"The name of the resource."},"description":{"type":"string","description":"The description of the resource."},"publicId":{"type":"string","description":"The public id of the scope."},"domains":{"type":"array","description":"The list of domains that are included in this scope.","items":{"$ref":"#/components/schemas/NamedResourceReferenceImpl"}},"communities":{"type":"array","description":"The list of communities that are included in this scope.","items":{"$ref":"#/components/schemas/NamedResourceReferenceImpl"}}}},"NamedResourceReferenceImpl":{"required":["id","resourceType"],"type":"object","properties":{"id":{"type":"string","description":"The id of the referenced resource.","format":"uuid"},"resourceType":{"type":"string","description":"The type of the resource, e.g. [Community, Asset, Domain, Attribute, Relation, WorkflowInstance, ...]. This property is deprecated and will be removed in the future. In order to stay backwards compatible and to enable us to introduce new types of resources, we are replacing the ResourceType enum with a String. For new types of resources that didn't exist before this change, resourceType will be BaseDataType. Please use the resourceDiscriminator property instead. Refer to the object containing the ResourceReference for possible values.","deprecated":true,"enum":["View","Asset","Community","Domain","AssetType","DomainType","Status","User","ClassificationMatch","UserGroup","Attribute","StringAttribute","ScriptAttribute","BooleanAttribute","DateAttribute","NumericAttribute","SingleValueListAttribute","MultiValueListAttribute","Comment","Attachment","Responsibility","Workflow","Job","Relation","RelationType","ComplexRelation","ComplexRelationType","ArticulationRule","Assignment","Scope","RelationTrace","ValidationRule","DataQualityRule","DataQualityMetric","Address","InstantMessagingAccount","Email","PhoneNumber","Website","Activity","FormProperty","WorkflowTask","ActivityChange","WorkflowInstance","Role","AttributeType","BooleanAttributeType","DateAttributeType","DateTimeAttributeType","MultiValueListAttributeType","NumericAttributeType","ScriptAttributeType","SingleValueListAttributeType","StringAttributeType","ViewSharingRule","ViewAssignmentRule","JdbcDriverFile","JdbcDriver","JdbcIngestionProperties","CsvIngestionProperties","ExcelIngestionProperties","ConnectionStringParameter","AssignedCharacteristicType","Notification","Tag","ComplexRelationLegType","ComplexRelationAttributeType","ComplexRelationLeg","BaseDataType","AdvancedDataType","DiagramPicture","DiagramPictureSharingRule","DiagramPictureAssignmentRule","Rating","Classification","PhysicalDataConnector","Context"]},"resourceDiscriminator":{"type":"string","description":"The resource discriminator, which indicates the type of the referenced resource, e.g. \"Community\", \"Asset\", ... Check the documentation of the class using the resource reference for detailed documentation regarding the possible resource discriminator values."},"name":{"type":"string","description":"The name of the referenced resource."}},"description":"Represents reference to the resource, including its name."}}},"paths":{"/files/{fileId}/info":{"get":{"tags":["Files"],"summary":"Get file information","description":"Returns information about the file identified by given id. Keep in mind to use GET /attachments/{attachmentId} instead of this endpoint when you want to get information of an attachment. A File and its id can be temporary so it's possible this endpoint will not get you the information of the desired file.","operationId":"getFileInfo","parameters":[{"name":"fileId","in":"path","description":"the id of the file","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The file information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeImpl"}}}}}}}}}
```


---

# 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 dynamically by asking a question.

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

```
GET https://developer.collibra.com/api/references/data-governance/files.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.
