Get entity files

GET/projects/{projectId}/entities/{entityId}/files

Base URL: https://api.tinkermode.com

Look up files associated with an entity instance. Use the begin and end query parameters to fetch only files with timestamps that fall within the time range. Use the tag parameter to fetch files with a matching tag. And use the contentType parameter to fetch only files that match the given content type.

Authentication

Send an Authorization header of the form ModeCloud <AUTH_CODE>.

Must contain a user API key of a user with permission to read entity files, a service account token with the same permission, or a project API key.

Path parameters

NameTypeRequiredConstraintsDescription
projectIdintegerYesThe unique ID for a specified project.
entityIdstringYesEntity ID (unique within project)

Query parameters

NameTypeRequiredConstraintsDescription
beginstringNoThe beginning time to search for entity files in RFC3339 format.
contentTypestringNoMIME type of the entity file to search for.
endstringNoThe end time to search for entity files in RFC3339 format.
limitintegerNoThe maximum number of entity files to return.
skipintegerNoThe number of entity files to skip.
sortBystringNoA sort key. timestamp is the valid field. (e.g. "timestamp:asc" or "timestamp:desc") The default order is ascending.
tagarray<string>NoIf specified, return files that contain the specified tag. If this parameter is repeated, files matching at least one of the tags will be returned.

Responses

200 Successful query for files associated with an entity instance.

Content type: application/json

An arbitrary file associated with an entity.

An array of objects with the following shape:

PropertyTypeRequiredConstraintsDescription
attributesobjectNoAttributes associated with the entity file, separated as key-value pairs.
contentTypestringNoMIME type of the entity file.
entityIdstringYesread-only (server-generated)Entity that this entity file belongs to.
expirationDatestringNoformat: date-timeTimestamp indicating when the entity file should expire.
fileIdstringNoread-only (server-generated)ID of the entity file.
fileNamestringNoread-only (server-generated)Name of the entity file.
projectIdintegerYesread-only (server-generated)Project that this entity file belongs to.
tagsarrayNoA collection of unique string identifiers associated with the entity file.
timestampstringNoread-only (server-generated); format: date-timeTimestamp of the entity file.
urlstringNoA pre-signed URL for file download.

401 Authorization is required to access this resource.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

403 Request failed because of denied permission.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

429 Request failed because of rate limit.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

500 An unexpected error has occurred.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

503 The service is temporarily unavailable.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.