---
title: Agents
slug: agents
docTags: 
createdAt: 2022-04-14T07:56:16.000Z
---

Methods allow you to get a list of portal agents or information on a specific agent.

***

::::ExpandableHeading
# <font color="#2166ae">GET</font> /agents

Return a list of agents.

:::ApiMethodV2
```json
{
  "tab": "request",
  "url": "https://instance_name/api/data/v1.0/agents/",
  "name": "Request example",
  "method": "GET",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Authorization",
        "type": "string",
        "description": "String in \"Token XXXXXX...\" format."
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "optional",
        "name": "limit",
        "type": "Integer",
        "description": "The number of results to return per page."
      },
      {
        "kind": "optional",
        "name": "offset",
        "type": "Integer",
        "description": "The initial index from which to return the results."
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "FJ3zsBaijz6TuVFI40xNy",
        "code": "{\n   \"count\":3,\n   \"next\":null,\n   \"previous\":null,\n   \"results\":[\n      {\n         \"id\":23679,\n         \"name\":\"Alex\",\n         \"route\":\"163968\",\n         \"agent_role\":null\n      },\n      {\n         \"id\":36777,\n         \"name\":\"Gina\",\n         \"route\":\"283140\",\n         \"agent_role\":null\n      },\n      {\n         \"id\":32410,\n         \"name\":\"John\",\n         \"route\":\"154039\",\n         \"agent_role\":null\n      }\n   ]\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "FJ3zsBaijz6TuVFI40xNy"
  },
  "examples": {
    "languages": [
      {
        "id": "dpmODah_ZAOTKtuSexN5X",
        "code": "curl –i –X GET\n  https://test.eyrene.com/api/data/v1.0/agents/ \n  -H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’\n  –F \"limit=3\" \\\n  –F \"offset=0\" ",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "dpmODah_ZAOTKtuSexN5X"
  },
  "description": "GET /agents",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "request-example",
  "legacyHash": "fTSqKQcxvB1_R5fgKhOgr"
}
```
:::

## Response parameters[​](https://help.inspector-cloud.com/en/docs/api/backend/methods/v1/agents/agents_list#response-definitions)

***

`count` *integer*

The number of agents.

***

`next` *string (uri)* <font color="#2166ae">Nullable</font>

Next page.

***

`previous` *string (uri)* <font color="#2166ae">Nullable</font>

Previous page.

***

`results` *array of objects*

An array of objects with information about agents.

- `id` *integer*
  Agent ID.
- `name` *string* <font color="#2166ae">[ 1 .. 255 ] characters</font>
  Agent name.
- `route` *string* <font color="#2166ae">&lt;= 255 characters Nullable</font>
  Agent route.
- `agent_role` *string* <font color="#2166ae">&lt;= 255 characters</font>
  Agent role.

***


::::

***

::::ExpandableHeading
# <font color="#2166ae">GET</font> /agents/\{id}

Return information about the agent by ID.

:::ApiMethodV2
```json
{
  "tab": "request",
  "url": "https://instance_name/api/data/v1.0/agents/{id}",
  "name": "Request example",
  "method": "GET",
  "request": {
    "pathParameters": [
      {
        "kind": "required",
        "name": "id",
        "type": "string",
        "description": "Agent ID."
      }
    ],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Authorization",
        "type": "string",
        "description": "String in \"Token XXXXXX...\" format."
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "FJ3zsBaijz6TuVFI40xNy",
        "code": "{\n   \"id\":19765,\n   \"name\":\"Alex\",\n   \"route\":\"163968\",\n   \"agent_role\":null\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "FJ3zsBaijz6TuVFI40xNy"
  },
  "examples": {
    "languages": [
      {
        "id": "dpmODah_ZAOTKtuSexN5X",
        "code": "curl –i –X GET\n  https://test.eyrene.com/api/data/v1.0/agents/19765/ \n  -H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’ \n  –F \"limit=3\" \\\n  –F \"offset=0\" ",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "dpmODah_ZAOTKtuSexN5X"
  },
  "description": "GET /agents/{id}",
  "currentNewParameter": {
    "label": "Path Parameter",
    "value": "pathParameters"
  },
  "autoGeneratedAnchorSlug": "request-example-1",
  "legacyHash": "5OoiDZf2X3TZ9_es4DmpQ"
}
```
:::

## Response parameters[​](https://help.inspector-cloud.com/en/docs/api/backend/methods/v1/agents/agents_read#response-definitions)

***

`id` *integer*

Agent ID.

***

`name` *string* <font color="#2166ae">[ 1 .. 255 ] characters</font>

Agent name.

***

`route` *string* <font color="#2166ae">&lt;= 255 characters Nullable</font>

Agent route.

***

`agent_role` *string* <font color="#2166ae">&lt;= 255 characters</font>

Agent role.

***
::::

***

