Source: https://atomicwork-preview.docs-staging.pageloop.ai/api-reference/forms/getapi-v-1-forms-entity-type-reference-key-entities

# Get list of options for the field identified by reference_key

GET `https://{tenant}.atomicwork.com/api/v1/forms/{entity_type}/{reference_key}/entities`

## Authorization

#### X-Api-Key (header, string, required)

## Headers

#### X-Workspace-Id (header, string)

## Path Parameters

#### entity\_type (path, enum (string), required)

#### reference\_key (path, string, required)

The reference key of a entity reference field

## Query Parameters

#### workspace\_id (query, integer)

The workspace id

#### request\_type (query, enum (string))

#### request\_id (query, string)

The request display id

#### entity\_id (query, integer)

The service item id in case entity\_type is SERVICE\_ITEM

#### parent\_option\_id (query, integer)

The parent option ID to query for child options

#### search\_key (query, string)

#### selected\_options\_ids (query, array of integer)

Deprecated, DO NOT USE. This was a typo. Use selected\_option\_ids instead.

#### selected\_option\_ids (query, array of integer)

#### is\_flattened\_nested\_field\_required (query, boolean)

#### page (query, integer, required)

#### per\_page (query, integer)

#### view (query, enum (string))

#### is\_workspace\_member (query, boolean)

#### subview (query, enum (string))

#### should\_have\_system\_user (query, boolean)

Include system users and bots in the response (SYSTEM and ATOMIC\_BOT types)

#### user\_type (query, enum (string))

Narrows the assignee/agent picker to a single user category. EMPLOYEE returns human
users only, AI\_EMPLOYEE returns AI coworkers only. These are the only two values used by
the picker tabs. When omitted, humans and AI coworkers are returned together (current
behavior). Any other enum value (e.g. EXTERNAL) is filtered as-is and yields no assignable
users, since external users are not valid assignees. Applied only to the user-flavoured
assignee resolution path; ignored for every other entity type.

#### template\_id (query, integer)

Change template ID. When entity\_type=CHANGE and reference\_key=requester,
filters the response to workspace members allowed by the template's
user\_segments (workspace agents always included). Ignored otherwise.

## Response

#### 200

Successful response

#### Request

```bash cURL
curl -X GET 'https://{tenant}.atomicwork.com/api/v1/forms/{entity_type}/{reference_key}/entities' \
  -H 'X-Api-Key: <api-key>'
```

```javascript JavaScript
const res = await fetch('https://{tenant}.atomicwork.com/api/v1/forms/{entity_type}/{reference_key}/entities', {
  method: 'GET',
  headers: {
    'X-Api-Key': '<api-key>',
  },
});
const data = await res.json();
```

```python Python
import requests

res = requests.get(
    'https://{tenant}.atomicwork.com/api/v1/forms/{entity_type}/{reference_key}/entities',
    headers={'X-Api-Key': '<api-key>'}
)
data = res.json()
```
