Skip to main content
POST
/
v2
/
entity-types
/
search
Search Entity Types
curl --request POST \
  --url https://public.api.serval.com/v2/entity-types/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "teamId": "<string>",
  "key": "<string>",
  "pageSize": 123,
  "pageToken": "<string>"
}
'
{
  "data": [
    {
      "id": "<string>",
      "teamId": "<string>",
      "key": "<string>",
      "name": "<string>",
      "parentEntityTypeId": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "createdByUserId": "<string>",
      "updatedByUserId": "<string>",
      "fields": [
        {
          "id": "<string>",
          "entityTypeId": "<string>",
          "key": "<string>",
          "name": "<string>",
          "dataType": "DATA_TYPE_UNSPECIFIED",
          "createdAt": "2023-11-07T05:31:56Z",
          "updatedAt": "2023-11-07T05:31:56Z",
          "createdByUserId": "<string>",
          "updatedByUserId": "<string>",
          "enumOptions": [
            {
              "id": "<string>",
              "value": "<string>",
              "displayName": "<string>",
              "displayOrder": 123
            }
          ],
          "isKeyField": true,
          "isNameField": true,
          "refEntityTypeId": "<string>",
          "description": "<string>",
          "sourceEntityTypeId": "<string>"
        }
      ],
      "color": "<string>",
      "iconSlug": "<string>",
      "entitySchemaId": "<string>",
      "helpAgentVisibility": "HELP_AGENT_ENTITY_VISIBILITY_UNSPECIFIED"
    }
  ],
  "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.

key
string | null

Optional filter by entity type key.

pageSize
integer<int32> | null

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

pageToken
string | null

Token for pagination. Leave empty for the first request.

Response

Success

data
EntityTypeWithFields · object[]

The list of matching entity types.

nextPageToken
string | null

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