When to use this endpoint

Use File_getTags when opening the legacy tag editor. Modern tables often already receive tags inside meta.

Authentication and permissions

Normal requests require signed API-key authentication or a logged-in CRM session and are scoped to that tenant. In CRM2, ordinary file types additionally require view permission on pageFiles; CRM1 does not apply that page permission.

File type 10 is always denied by the shared read guard. Types 6, 8, and 16 bypass that guard’s session/page-files checks, while types 6, 7, and 9 bypass only its CRM2 page check after login. Routes that explicitly call the login guard still require login, and download routes still need a resolvable tenant context. A separately established shareable-link context may also bypass the shared read guard.

Parameters

ParameterTypeRequiredDescription
idInteger-compatibleYesPositive file ID.

Example request

$tags = FM_api('File_getTags', ['id' => '4821']);

Example response

"annual service\ncompressor"

Errors and unusual responses

ResponseCondition
{"error":"not logged in"}No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs.
{"error":"missing or invalid parameter: id"}ID is absent or non-positive.
{"error":"no such file"}No row matches.

Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.

Behaviour and edge cases

  • Soft-deleted rows return no such file. Missing meta.tags returns an empty string. Malformed metadata decodes as null and also falls back to empty.
  • There is no pagination or side effect.

See it in Fieldmotion

CRM1

Click the Tags cell on Customer, Job, Asset, User, Task, or related Files tables.

CRM2

Most modern tables display tags from mapped metadata; some tag editors still call the matching setter directly rather than this getter.

Related endpoints