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": [
        {
          "boolValue": {
            "eq": true
          },
          "fieldId": "<string>",
          "fieldKey": "<string>"
        }
      ],
      "nameFilter": {
        "contains": "<string>",
        "eq": "<string>",
        "ne": "<string>"
      },
      "numberFilter": {
        "eq": 123,
        "gt": 123,
        "gte": 123,
        "lt": 123,
        "lte": 123,
        "ne": 123
      },
      "sourceFilter": {
        "eq": "<string>",
        "ne": "<string>"
      }
    }
  ],
  "fieldSorts": [
    {
      "entityName": {},
      "descending": true
    }
  ],
  "pageSize": 123,
  "pageToken": "<string>",
  "key": "<string>"
}
'
{
  "data": [
    {
      "id": "<string>",
      "key": "<string>",
      "name": "<string>",
      "number": 123,
      "teamId": "<string>",
      "teamPrefix": "<string>",
      "entityTypeId": "<string>",
      "entityTypeKey": "<string>",
      "createdByUserId": "<string>",
      "updatedByUserId": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "deletedAt": "2023-11-07T05:31:56Z",
      "fieldValues": [
        {
          "fieldId": "<string>",
          "fieldKey": "<string>",
          "fieldName": "<string>",
          "dataType": "DATA_TYPE_UNSPECIFIED",
          "value": 123,
          "setByUserId": "<string>",
          "setByIngestionConfigId": "<string>"
        }
      ],
      "sourceAppInstanceIds": [
        "<string>"
      ],
      "sharedMetadata": {
        "sourceTeamId": "<string>",
        "sourceTeamName": "<string>"
      }
    }
  ],
  "nextPageToken": "<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
EntityFilterGroup · object[]

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

fieldSorts
(Entity Name · object | Entity Number · object | Entity Source · object | Field Id · object | Field Key · object)[]

Sorting specifications.

pageSize
integer<int32> | null

Maximum number of results to return. Default is 2000, maximum is 5000.

pageToken
string | null

Token for pagination. Leave empty for the first request.

key
string | null

Optional filter by entity key (exact match).

Response

Success

data
Entity · object[]

The list of matching entities.

nextPageToken
string | null

Token for retrieving the next page of results. Empty if no more results.