Skip to main content
POST
/
v2
/
entities
/
search
Search Entities
curl --request POST \
  --url https://public.api.serval.com/v2/entities/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "teamId": "<string>",
  "entityTypeId": "<string>",
  "entityTypeKey": "<string>",
  "filterGroups": [
    {
      "filters": [
        {
          "valueBool": true,
          "valueNumber": 123,
          "valueText": "<string>",
          "valueTs": "2023-11-07T05:31:56Z"
        }
      ]
    }
  ],
  "nameSearch": "<string>",
  "fieldSorts": [
    {
      "fieldId": "<string>",
      "fieldKey": "<string>",
      "descending": true
    }
  ],
  "limit": 123,
  "offset": 123
}
'
{
  "data": [
    {
      "id": "<string>",
      "teamId": "<string>",
      "entityTypeId": "<string>",
      "key": "<string>",
      "name": "<string>",
      "number": 123,
      "createdByUserId": "<string>",
      "updatedByUserId": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "document": "<string>",
      "entityTypeKey": "<string>",
      "entitySchemaKey": "<string>",
      "entitySchemaId": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
teamId
string

The ID of the team.

entityTypeId
string | null

Optional filter by entity type ID.

entityTypeKey
string | null

Optional filter by entity type key (alternative to entity_type_id).

filterGroups
EntityFieldFilterGroup · object[]

Filter groups for complex filtering. OR between groups, AND within each group.

nameSearch
string | null

Optional text search on entity name.

fieldSorts
FieldSort · object[]

Sorting specifications.

limit
integer<int32> | null

Maximum number of results to return.

offset
integer<int32> | null

Number of results to skip (for pagination).

Response

Success

data
Entity · object[]

The list of matching entities.