> ## Documentation Index
> Fetch the complete documentation index at: https://docs.curator.interworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Data Manager

> Data Manager API endpoints for reading Curator tables and managing data groups, attributes, and items.

The Data Manager API covers two separate jobs. `getDataTables` and `getData` read supported Curator
tables directly, which is how you export content, activity, and configuration data from a portal. The
remaining endpoints create and maintain Data Manager groups, attributes, and items.

Every endpoint follows the standard Curator API pattern and requires an API key:

```
[your_domain]/api/v1/datamanager/[endpoint]?apikey=[your_api_key_here]
```

<Note>
  API keys can be restricted per endpoint. A key that is otherwise valid returns
  `This key is restricted from using this end point` when it has not been granted access to the
  endpoint you are calling. See [Authentication](/curator_api/api_docs/authentication) for how keys are
  issued and rate limited.
</Note>

## /datamanager/getDataTables

Lists the tables that `getData` will serve on this portal. Call this first. The list is assembled at
runtime from the plugins that are installed and enabled, so it differs between portals and between
Curator versions. Reading it is more reliable than assuming a fixed set of tables.

**Parameters:**

None.

**Returns:**

array

Keys are table names to pass to `getData`. Values are the display names shown in the backend.

**Example Response:**

```JSON theme={null}
    {
        "interworks_content_files": "Curator Files",
        "interworks_content_keywords": "Curator Keywords",
        "interworks_content_pages": "Curator Pages",
        "interworks_tableauviz_dashboards": "Curator Tableau Dashboards",
        "interworks_usermgmt_content_view": "Curator Content Views",
        "interworks_usermgmt_content_view_summary": "Curator Content Views Summary",
        "page_keyword": "Curator Page / Keyword Relationships"
    }
```

## /datamanager/getData

Returns rows from one of the tables listed by `getDataTables`. Any other table is rejected, so this
endpoint cannot be used to read arbitrary tables.

**Parameters:**

**table**

The table to read. Required. Must be one of the keys returned by `getDataTables`.

**limit**

Number of records to return. Optional, defaults to `1000`.

**offset**

Number of records to skip, for pagination. Optional.

**sort\_column**

Column to sort by. Optional. A column that does not exist on the table is ignored rather than fatal, and
the response carries a `warning` explaining that the sort was skipped.

**sort\_direction**

Sort direction, either `asc` or `desc`. Optional, defaults to `asc`.

**Returns:**

array

**Example Usage:**

```
[your_domain]/api/v1/datamanager/getData?apikey=[your_api_key_here]&table=interworks_content_pages&limit=2
```

**Example Response:**

```JSON theme={null}
    {
        "result": "Success",
        "data": [
            {
                "id": 1,
                "title": "Company Handbook",
                "slug": "company-handbook",
                "created_at": "2025-02-19 16:11:10",
                "updated_at": "2025-02-19 16:11:10"
            },
            {
                "id": 2,
                "title": "Quarterly Review",
                "slug": "quarterly-review",
                "created_at": "2025-02-20 09:04:55",
                "updated_at": "2025-02-20 09:04:55"
            }
        ]
    }
```

### Paging through a large table

Requests that carry an `apikey` are rate limited, and the default `limit` is 1000 rows. Page through
larger tables with `limit` and `offset` rather than requesting everything at once:

```
[your_domain]/api/v1/datamanager/getData?apikey=[your_api_key_here]&table=interworks_usermgmt_content_view&limit=1000&offset=0
[your_domain]/api/v1/datamanager/getData?apikey=[your_api_key_here]&table=interworks_usermgmt_content_view&limit=1000&offset=1000
```

Sorting on an indexed column such as `created_at` keeps paging stable while new rows are being written.

### Errors

`getData` returns `"result": "Error"` with one of these messages:

| Message                                       | Cause                                                                                                                             |
| --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `Missing table argument`                      | The `table` parameter was not supplied.                                                                                           |
| `Table not found in list of supported tables` | The table is not one of the keys from `getDataTables`.                                                                            |
| `Table not found: [table]`                    | The table is supported but does not exist on this portal, usually because the plugin that provides it has not run its migrations. |

## /datamanager/listGroups

Lists Data Manager groups.

**Returns:**

array

## /datamanager/listAttributes

Lists Data Manager attributes.

**Returns:**

array

## /datamanager/listItems

Lists Data Manager items.

**Parameters:**

**group\_id**

Filter results to those within a specific group. Optional.

**limit**

Number of records to limit the result to. Optional.

**offset**

Number of records to skip for pagination purposes. Optional.

**Returns:**

array

## /datamanager/createGroup

Creates a Data Manager group.

**Parameters:**

**name**

Name of the group.

**slug**

Unique URL identifier for this group on the frontend.

**captcha**

Which type of captcha is required to submit.

**options**

Various options for field option filtering. Optional.

**frontend\_accessible**

Whether this group is accessible from the frontend. Pass the string `true` to enable it. Any other value,
including `1`, is treated as false. Optional, defaults to false.

**dashboard\_id**

ID of the Dashboard to display on the frontend. Optional.

**batch\_import**

Whether to allow batch importing on the frontend. Pass the string `true` to enable it. Any other value,
including `1`, is treated as false. Optional, defaults to false.

**enable\_data\_ajax**

Whether to allow data to be retrieved from an Ajax call. Pass the string `true` to enable it. Any other
value, including `1`, is treated as false. Optional, defaults to false.

**email\_submissions**

Whether to send copies of submissions to an email. Pass the string `true` to enable it. Any other value,
including `1`, is treated as false. Optional, defaults to false.

**email\_address**

Which email address to send to. Optional unless using `email_submissions`.

**recaptcha\_site\_key**

reCaptcha site key. Optional unless using reCaptcha.

**recaptcha\_secret\_key**

reCaptcha secret. Optional unless using reCaptcha.

**revision\_history**

Whether to track revision history. Pass the string `true` to enable it. Any other value, including `1`, is
treated as false. Optional, defaults to false.

**Returns:**

array

## /datamanager/createAttribute

Creates a Data Manager attribute.

**Parameters:**

**name**

Name of the attribute.

**type**

Data type of the attribute, for example `text`, `number`, or `dropdown`.

**multi\_select**

Whether a dropdown is multi-select. Pass the string `true` to enable it. Any other value, including `1`,
is treated as false. Optional, defaults to false.

**required**

Whether the attribute is required. Pass the string `true` to enable it. Any other value, including `1`, is
treated as false. Optional, defaults to false.

**searchable**

Whether the attribute is searchable. Pass the string `true` to enable it. Any other value, including `1`,
is treated as false. Optional, defaults to false.

**editable**

Whether the attribute is editable on the frontend. Pass the string `true` to enable it. Any other value,
including `1`, is treated as false. Optional, defaults to false.

**options**

Options for the attribute, used for dropdowns and validation. Optional.

**description**

Description of the attribute. Optional.

**sort\_order**

Sort order when listing attributes. Optional.

**Returns:**

array

## /datamanager/addAttributeToGroup

Adds a Data Manager attribute to a Data Manager group.

**Parameters:**

**attribute\_id**

ID of the attribute to add to the group.

**group\_id**

ID of the group to add the attribute to.

**Returns:**

array

## /datamanager/removeAttributeFromGroup

Removes a Data Manager attribute from a Data Manager group.

**Parameters:**

**attribute\_id**

ID of the attribute to remove from the group.

**group\_id**

ID of the group to remove the attribute from.

**Returns:**

array

## /datamanager/createItem

Creates a Data Manager item, also called a data record.

**Parameters:**

**group\_id**

ID of the Data Manager group. Required.

**attribute\_\[id]**

The value of each attribute within the group, where `[id]` is the attribute ID.

**Returns:**

array

**Example Response:**

```JSON theme={null}
    {
        "result": "Success",
        "msg": "Successfully created item in group",
        "group_id": 3,
        "item_id": 47
    }
```

## /datamanager/updateItem

Updates a Data Manager item.

**Parameters:**

**item\_id**

ID of the Data Manager item being updated.

**group\_id**

ID of the Data Manager group.

**attribute\_\[id]**

The value of each attribute within the group, where `[id]` is the attribute ID. Optional.

**Returns:**

array

## /datamanager/deleteItem

Deletes a Data Manager item by ID.

**Parameters:**

**item\_id**

The ID of the item to delete.

**Returns:**

array

## /datamanager/deleteItemsByGroup

Deletes all Data Manager items associated with a specified group.

**Parameters:**

**group\_id**

The ID of the group to delete all items from.

**Returns:**

array
