---
title: "Search Agent Access Tokens"
method: POST
path: "/api/v2/AgentAccessTokens/search"
tags: ["AgentAccessTokens"]
---

# Search Agent Access Tokens

`POST /api/v2/AgentAccessTokens/search`

Search all enabled agent access tokens in your FortiCNAPP instance  by invoking the following endpoint:

  > `POST https://YourAccount.lacework.net/api/v2/AgentAccessTokens/search`

  To limit the returned result, optionally specify one or more filters in the request body. For more information about using filters, see the [Simple & Advanced Search section](/api/v2/docs/#tag/OVERVIEW). 

  You can filter on the following fields:

  * `accessToken`

  * `createdTime`

  * `tokenAlias`

  * `tokenEnabled`

  * `version`

 

  Here is an example `body` payload:

  > `{ "filters" : [ { "expression": "eq", "field": "tokenAlias", "value": "Eng" } ] } `

## Headers

- `Authorization` string, required
- `Content-Type` string, required

## Request body

- GETDATAREQUESTBODYFILTERS
  - `filters` object[] — One or more condition statements you can use to refine the data returned by the request. Only records that satisfy filtering conditions are returned. If there are multiple conditions, a record must satisfy all conditions for a match.
    - `expression` 'eq' | 'ne' | 'in' | 'not_in' | 'like' | 'ilike' | 'not_like' | 'not_ilike' | 'not_rlike' | 'rlike' | 'gt' | 'ge' | 'lt' | 'le' | 'between', required — The comparison operator for the filter condition.
    - `field` string, required — The name of the data field to which the condition applies.
    - `value` string — The value that the condition checks for in the specified field. Use this attribute when specifying a single value.
    - `values` string[] — The values that the condition checks for in the specified field. Use this attribute when specifying multiple values.
  - `returns` string[] — Use this attribute to specify which top-level fields of the response schema you want to receive.

## Response `200`

No Error (List of Agent Access Tokens)

- object
  - `data` AgentAccessTokensResponseSchema[]
    - `props` object — The access token's properties, including `createdTime` and `description`.
      - `description` string — A brief description of the token creation.
      - `os` string — The operating system.
      - `subscription` 'standard' | 'professional' | 'enterprise' — The subscription level of the token.
    - `tokenEnabled` string, required — The `tokenEnabled` property determines if an edit control is a "Text token" edit control. When the `tokenEnabled` property is set to `1`, if the user enters a separator character or a carriage return (CR), a token is automatically added and the user can continue entering values in the control.
    - `tokenAlias` string, required — The token's alias such as Ops Agent. Aliases help communicate the intended purpose of a token and are effective when a value with a single intent appears in multiple places.
    - `accessToken` string — The new agent access token.
    - `createdTime` string — The time and date when the token was issued by FortiCNAPP.
    - `version` string — The FortiCNAPP Agent's version.

## Other responses

- `204` — No Data
- `4XX` — Client Error
- `5XX` — Internal Server Error

---

[API](https://skmtc.net/lacework/apis/forticnapp-api-2-0-documentation.md) · [All operations](https://skmtc.net/lacework/apis/forticnapp-api-2-0-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lacework/forticnapp-api-2-0-documentation/versions/7015f76895f2/schema)
