This resource is part of the asset-centric data model.
- New projects: We recommend using the data modeling service for greater flexibility and performance.
- Existing projects: Asset-centric file metadata and the asset filters
assetIds,rootAssetIds, andassetSubtreeIdsare deprecated on advanced list, aggregate, list, and search. Look up files by querying CogniteFile instances connected to CogniteAsset. Metadata updates forCogniteFileare blocked on the files update endpoint, and files cannot be linked to asset-centric assets. Data set and label governance on files is removed. File content upload and download stay available throughinstanceId.initUploadstays available for files that are notCogniteFilewhen you have thefiles:writecapability. See Deprecated and retired features and Data modeling status for CDF projects.
Looking for file upload/download? See File content for uploading and downloading files.This page focuses on file metadata management for asset-centric projects.
id generated at file creation. Specify a fileName when the file is created. If you want to be in control of the file identifier, you can specify an externalId which must be unique within a project.
A file can also have metadata key-value fields that are searchable. You can use these fields to store source system IDs and other information. Additionally, files can have labels attached to them, making it easier to organize and categorize files.
Geographic location of files
Specify a file’s geographic location, for example, its geometric features and coordinates, in thegeoLocation field. Data in this field needs to follow the GeoJSON specification, explained in detail in RFC 7946. The coordinate reference system for all GeoJSON coordinates is a geographic coordinate reference system that uses the World Geodetic System 1984 (WGS84).
GeoJSON types
A GeoJSON object has one of 3 types:- Feature - Geometric objects with (optional) extra features.
- FeatureCollection - A collection of Features.
- GeometryCollection - A collection of Geometry objects (see below).
type and a corresponding array of coordinates. Below are the supported Geometry types:
Adding geoLocation to a file
ThegeoLocation field requires the following properties:
type
The type of GeoJSON. CDF only supports theFeature type.
geometry
Represents the points, curves, and surfaces in coordinate space. The property consists of:-
type- Must be one of the following geometry types:Point,MultiPoint,LineString,MultiLineString,Polygon, andMultiPolygon. See GeoJSON types above. -
coordinates- An array describing the specified geometry type. The type of geometry determines the shape of this array. For instance, aPointgeometry type will contain acoordinatearray consisting of just a single x and a single y coordinate. See example 1 below. -
A
LineStringgeometry type will contain acoordinatearray with two or more points, as shown in example 2. APolygongeometry type will need to contain an array of closedLineStringswith four or more points, as shown in example 3. See the GeoJSON spec for more details on the various shapes of thecoordinatesfield.
properties
An optional field specifying extra information to enrich theFeature.
Example 1
Polygon specifies an outer and inner LineString.
A Polygon can (but doesn’t have to) contain several of these LineStrings, where the first must be the exterior ring, and the next LineStrings are interior rings. This is how you would define a surface with holes.
Upload example
Update example
GeoLocation filtering
Filtering on, or searching for files matching a certaingeoLocation requires two properties:
-
relation- The geographic relation, eitherINTERSECTS,WITHIN, orDISJOINT. -
shape- Thegeometry, as described in the geometry section. Filtering is not available for theMultiPointtype.





