In Cognite Data Fusion, the file resource type stores files and documents that are related to one or more assets. For example, a file can contain a piping and instrumentation diagram (P&ID) that shows how multiple assets are connected.
In this article:
Files are created in two steps where the first step stores the metadata in a file object, and the second step uploads the file contents. This means that files can exist in Cognite Data Fusion without actually being uploaded.
Each file is identified by a unique
id that is generated when the file is a created. You also have to specify a
fileName when the file is created.
Optionally, a you can specify an
externalId for a file. The
externalId must be unique within a project.
A file can also have metadata key-value fields. You can use the metadata fields for example to store "directory" information, source system IDs and other information. The metadata fields can be searched.
You can return the information for a file, both standard fields and the dynamic metadata field, by using the files list or search REST API calls. You can download the file contents with the file download REST API call.
See the files API documentation for more information about how to work with the files API.