TrustLayer Views API
The Views API from TrustLayer — 2 operation(s) for views.
The Views API from TrustLayer — 2 operation(s) for views.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/trustlayer-views-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: TrustLayer Platform API V2 (Early Access) Views API
description: The following documentation sets out to provide everything you need to build your solutions using the TrustLayer API.
termsOfService: https://trustlayer.io/terms-of-use/
version: 2.0.0-beta
contact:
name: TrustLayer API Services
email: api@trustlayer.io
license:
name: Apache 2.0
url: https://apache.org/licenses/LICENSE-2.0
servers:
- url: https://api.trustlayer.io/v2
description: Production Server
- url: https://api.integration.trustlayer.dev/v2
description: Integration Server
- url: https://api.demo.trustlayer.dev/v2
description: Demo Server
security:
- Bearer Auth: []
tags:
- name: Views
paths:
/views:
get:
tags:
- Views
description: 'List views in the caller''s organization. Results are scoped to the caller''s organization and to views the caller has read access to (own private views plus workspace-visible views). Supports pagination via `limit` and `skip`.
**Filtering**: `_id` (objectId), `createdAt` (date), `updatedAt` (date), `name` (string), `type` (string), `visibility` (string), `readonly` (string), `userId` (objectId), `reference.id` (objectId), `reference.type` (string). See "List Endpoints" in the API overview for operator syntax and combining rules.
**Sorting**: supported via `sort` (see the parameter''s description for allowed fields). Prefix with `-` for descending.
**Field projection**: supported via `fields` (see the parameter''s description for allowed fields).'
parameters:
- schema:
default: 20
type: integer
maximum: 100
exclusiveMinimum: 0
in: query
name: limit
required: false
- schema:
default: 0
type: integer
minimum: 0
maximum: 9007199254740991
in: query
name: skip
required: false
- schema:
type: string
minLength: 1
in: query
name: sort
required: false
description: 'Comma-separated list of fields to sort by. Example: ''_id,-createdAt''. Allowed: name, type, visibility, readonly, createdAt, updatedAt'
- schema:
type: string
minLength: 1
in: query
name: fields
required: false
description: 'Comma-separated list of fields to project. Allowed: _id, organization, name, type, reference, filter, userId, visibility, readonly, createdAt, updatedAt'
- schema:
type: string
in: query
name: _id
required: false
description: Filter by _id. 24-character hex ObjectId string (e.g. `_id=507f1f77bcf86cd799439011`). See "List Endpoints" in the API overview for operator syntax.
- schema:
type: string
in: query
name: createdAt
required: false
description: Filter by createdAt. ISO-8601 date or datetime string (e.g. `createdAt=2024-01-15`). See "List Endpoints" in the API overview for operator syntax.
- schema:
type: string
in: query
name: updatedAt
required: false
description: Filter by updatedAt. ISO-8601 date or datetime string (e.g. `updatedAt=2024-01-15`). See "List Endpoints" in the API overview for operator syntax.
- schema:
type: string
in: query
name: name
required: false
description: Filter by name. String value (e.g. `name=example`). See "List Endpoints" in the API overview for operator syntax.
- schema:
type: string
in: query
name: type
required: false
description: Filter by type. String value (e.g. `type=example`). See "List Endpoints" in the API overview for operator syntax.
- schema:
type: string
in: query
name: visibility
required: false
description: Filter by visibility. String value (e.g. `visibility=example`). See "List Endpoints" in the API overview for operator syntax.
- schema:
type: string
in: query
name: readonly
required: false
description: Filter by readonly. String value (e.g. `readonly=example`). See "List Endpoints" in the API overview for operator syntax.
- schema:
type: string
in: query
name: userId
required: false
description: Filter by userId. 24-character hex ObjectId string (e.g. `userId=507f1f77bcf86cd799439011`). See "List Endpoints" in the API overview for operator syntax.
- schema:
type: string
in: query
name: reference.id
required: false
description: Filter by reference.id. 24-character hex ObjectId string (e.g. `reference.id=507f1f77bcf86cd799439011`). See "List Endpoints" in the API overview for operator syntax.
- schema:
type: string
in: query
name: reference.type
required: false
description: Filter by reference.type. String value (e.g. `reference.type=example`). See "List Endpoints" in the API overview for operator syntax.
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
type: object
properties:
_id:
description: Unique identifier of the view.
allOf:
- $ref: '#/components/schemas/objectId'
organization:
description: Identifier of the organization (workspace) that owns the view. Always equal to the caller's organization.
allOf:
- $ref: '#/components/schemas/objectId'
name:
type: string
minLength: 1
description: Human-readable name of the view.
type:
type: string
enum:
- PrimaryRecord
- ContextRecord
- Document
description: Domain entity this view targets (e.g. primary records, request records).
reference:
type: object
properties:
type:
type: string
enum:
- PrimaryObject
- ContextObject
id:
allOf:
- $ref: '#/components/schemas/objectId'
additionalProperties: false
description: Optional reference linking this view to a specific entity (e.g. a primary object). Sub-fields may be absent under field projection.
filter:
type: object
additionalProperties: {}
description: Filter tree applied to view results. Tree nodes use the `and`/`or` operators.
userId:
description: Identifier of the user who owns this view.
allOf:
- $ref: '#/components/schemas/objectId'
visibility:
type: string
enum:
- private
- workspace
description: Visibility of the view (private to the owner or shared with the workspace).
readonly:
type: boolean
description: Whether the view is read-only (cannot be edited or deleted).
createdAt:
description: Timestamp at which the view was created.
type: string
format: date-time
updatedAt:
description: Timestamp at which the view was last updated.
type: string
format: date-time
required:
- _id
additionalProperties: false
meta:
type: object
properties:
count:
type: number
description: Total number of records matching the query, across all pages.
next:
description: Relative URL for the next page of results, preserving filters/sort/projection. Omitted on the last page.
type: string
prev:
description: Relative URL for the previous page of results, preserving filters/sort/projection. Omitted on the first page.
type: string
required:
- count
additionalProperties: false
required:
- data
- meta
additionalProperties: false
'400':
description: The request could not be understood — invalid body payload, unknown querystring filter, or a schema validation failure.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: number
enum:
- 400
applicationCode:
type: string
description: Machine-readable error code. For application errors this is the ApplicationError.applicationCode (e.g. "FLOW.006"); for schema validation failures it is "FLOW.002" (InvalidData); for unexpected server failures it is "LIB.000".
message:
type: string
description: Human-readable error message.
details:
description: Optional additional context about the error.
required:
- statusCode
- applicationCode
- message
additionalProperties: false
description: The request could not be understood — invalid body payload, unknown querystring filter, or a schema validation failure.
'401':
description: Authentication failed — the bearer token is missing, malformed, expired, or does not grant access to this resource.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: number
enum:
- 401
applicationCode:
type: string
description: Machine-readable error code. For application errors this is the ApplicationError.applicationCode (e.g. "FLOW.006"); for schema validation failures it is "FLOW.002" (InvalidData); for unexpected server failures it is "LIB.000".
message:
type: string
description: Human-readable error message.
details:
description: Optional additional context about the error.
required:
- statusCode
- applicationCode
- message
additionalProperties: false
description: Authentication failed — the bearer token is missing, malformed, expired, or does not grant access to this resource.
'403':
description: The authenticated caller does not have permission to perform this action on the target resource.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: number
enum:
- 403
applicationCode:
type: string
description: Machine-readable error code. For application errors this is the ApplicationError.applicationCode (e.g. "FLOW.006"); for schema validation failures it is "FLOW.002" (InvalidData); for unexpected server failures it is "LIB.000".
message:
type: string
description: Human-readable error message.
details:
description: Optional additional context about the error.
required:
- statusCode
- applicationCode
- message
additionalProperties: false
description: The authenticated caller does not have permission to perform this action on the target resource.
'404':
description: The requested resource does not exist or is not visible to the authenticated caller.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: number
enum:
- 404
applicationCode:
type: string
description: Machine-readable error code. For application errors this is the ApplicationError.applicationCode (e.g. "FLOW.006"); for schema validation failures it is "FLOW.002" (InvalidData); for unexpected server failures it is "LIB.000".
message:
type: string
description: Human-readable error message.
details:
description: Optional additional context about the error.
required:
- statusCode
- applicationCode
- message
additionalProperties: false
description: The requested resource does not exist or is not visible to the authenticated caller.
'500':
description: The server encountered an unexpected failure while processing the request.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: number
enum:
- 500
applicationCode:
type: string
description: Machine-readable error code. For application errors this is the ApplicationError.applicationCode (e.g. "FLOW.006"); for schema validation failures it is "FLOW.002" (InvalidData); for unexpected server failures it is "LIB.000".
message:
type: string
description: Human-readable error message.
details:
description: Optional additional context about the error.
required:
- statusCode
- applicationCode
- message
additionalProperties: false
description: The server encountered an unexpected failure while processing the request.
summary: Get views
x-summary-source: derived
operationId: getViews
x-operation-id-source: derived
/views/{id}:
get:
tags:
- Views
description: Read a single view by id, scoped to the caller's organization and to views the caller has read access to. Use the `fields` query parameter to limit the response to a projection of the view.
parameters:
- schema:
type: string
minLength: 1
in: query
name: fields
required: false
description: 'Comma-separated list of fields to project. Allowed: _id, organization, name, type, reference, filter, userId, visibility, readonly, createdAt, updatedAt'
- schema:
allOf:
- $ref: '#/components/schemas/objectIdInput'
in: path
name: id
required: true
description: Identifier of the view to read.
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: object
properties:
_id:
description: Unique identifier of the view.
allOf:
- $ref: '#/components/schemas/objectId'
organization:
description: Identifier of the organization (workspace) that owns the view. Always equal to the caller's organization.
allOf:
- $ref: '#/components/schemas/objectId'
name:
type: string
minLength: 1
description: Human-readable name of the view.
type:
type: string
enum:
- PrimaryRecord
- ContextRecord
- Document
description: Domain entity this view targets (e.g. primary records, request records).
reference:
type: object
properties:
type:
type: string
enum:
- PrimaryObject
- ContextObject
id:
allOf:
- $ref: '#/components/schemas/objectId'
additionalProperties: false
description: Optional reference linking this view to a specific entity (e.g. a primary object). Sub-fields may be absent under field projection.
filter:
type: object
additionalProperties: {}
description: Filter tree applied to view results. Tree nodes use the `and`/`or` operators.
userId:
description: Identifier of the user who owns this view.
allOf:
- $ref: '#/components/schemas/objectId'
visibility:
type: string
enum:
- private
- workspace
description: Visibility of the view (private to the owner or shared with the workspace).
readonly:
type: boolean
description: Whether the view is read-only (cannot be edited or deleted).
createdAt:
description: Timestamp at which the view was created.
type: string
format: date-time
updatedAt:
description: Timestamp at which the view was last updated.
type: string
format: date-time
required:
- _id
additionalProperties: false
'400':
description: The request could not be understood — invalid body payload, unknown querystring filter, or a schema validation failure.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: number
enum:
- 400
applicationCode:
type: string
description: Machine-readable error code. For application errors this is the ApplicationError.applicationCode (e.g. "FLOW.006"); for schema validation failures it is "FLOW.002" (InvalidData); for unexpected server failures it is "LIB.000".
message:
type: string
description: Human-readable error message.
details:
description: Optional additional context about the error.
required:
- statusCode
- applicationCode
- message
additionalProperties: false
description: The request could not be understood — invalid body payload, unknown querystring filter, or a schema validation failure.
'401':
description: Authentication failed — the bearer token is missing, malformed, expired, or does not grant access to this resource.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: number
enum:
- 401
applicationCode:
type: string
description: Machine-readable error code. For application errors this is the ApplicationError.applicationCode (e.g. "FLOW.006"); for schema validation failures it is "FLOW.002" (InvalidData); for unexpected server failures it is "LIB.000".
message:
type: string
description: Human-readable error message.
details:
description: Optional additional context about the error.
required:
- statusCode
- applicationCode
- message
additionalProperties: false
description: Authentication failed — the bearer token is missing, malformed, expired, or does not grant access to this resource.
'403':
description: The authenticated caller does not have permission to perform this action on the target resource.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: number
enum:
- 403
applicationCode:
type: string
description: Machine-readable error code. For application errors this is the ApplicationError.applicationCode (e.g. "FLOW.006"); for schema validation failures it is "FLOW.002" (InvalidData); for unexpected server failures it is "LIB.000".
message:
type: string
description: Human-readable error message.
details:
description: Optional additional context about the error.
required:
- statusCode
- applicationCode
- message
additionalProperties: false
description: The authenticated caller does not have permission to perform this action on the target resource.
'404':
description: The requested resource does not exist or is not visible to the authenticated caller.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: number
enum:
- 404
applicationCode:
type: string
description: Machine-readable error code. For application errors this is the ApplicationError.applicationCode (e.g. "FLOW.006"); for schema validation failures it is "FLOW.002" (InvalidData); for unexpected server failures it is "LIB.000".
message:
type: string
description: Human-readable error message.
details:
description: Optional additional context about the error.
required:
- statusCode
- applicationCode
- message
additionalProperties: false
description: The requested resource does not exist or is not visible to the authenticated caller.
'500':
description: The server encountered an unexpected failure while processing the request.
content:
application/json:
schema:
type: object
properties:
statusCode:
type: number
enum:
- 500
applicationCode:
type: string
description: Machine-readable error code. For application errors this is the ApplicationError.applicationCode (e.g. "FLOW.006"); for schema validation failures it is "FLOW.002" (InvalidData); for unexpected server failures it is "LIB.000".
message:
type: string
description: Human-readable error message.
details:
description: Optional additional context about the error.
required:
- statusCode
- applicationCode
- message
additionalProperties: false
description: The server encountered an unexpected failure while processing the request.
summary: Get views by id
x-summary-source: derived
operationId: getViewsById
x-operation-id-source: derived
components:
schemas:
objectIdInput:
title: ObjectId
type: string
format: ObjectId
examples:
- 507f1f77bcf86cd799439011
objectId:
title: ObjectId
type: string
format: ObjectId
examples:
- 507f1f77bcf86cd799439011
securitySchemes:
Bearer_Auth:
type: http
scheme: bearer
description: 'Enter your API token:'