This article describes the API endpoint introduced in v7.2.0 for retrieving Content Types:
/api/content_type: Retrieve all available Content Types along with their metadata and icons.
PREREQUISITES:
- Set up API access.
- Verify that you have API access and obtain a token via get_token call.
1. Access Admin > System > API Toolkit
2. Retrieve Content Types
- The GET request to
/api/content_typeretrieves all available Content Types across Metric Insights. - The GET request to
/api/content_type/id/<ID>retrieves the specified Content Type by its ID.
- Item: content_type.
- Method: GET.
- Optionally, filter the results by:
- ID: The Content Type ID.
- name: The name of the Content Type.
- alias: The alias of the Content Type.
- with_icons: Specify whether to retrieve the information on Content Type icons.
- Enter an API Token
- [Run request]
Example Response
{
"content_types": [
{
"id": 1,
"name": "Alation",
"alias": "Alation",
"description": null,
"icon": "<svg><!-- Full SVG markup omitted --></svg>",
"icon_name": "icon-alation.svg",
"generic_icon": null,
"generic_icon_name": ""
},
{
"id": 2,
"name": "Alteryx",
"alias": "Alteryx",
"description": null,
"icon": "<svg><!-- Full SVG markup omitted --></svg>",
"icon_name": "icon-alteryx.svg",
"generic_icon": null,
"generic_icon_name": ""
}
]
}
Fields Description
| Parameter Name | Value Type | Description |
|---|---|---|
| id | integer | The ID of the Content Type. |
| name | string | The display name of the Content Type. |
| alias | string | Alternate display name of the Content Type. |
| description | string | The description of the Content Type. |
The fields below are returned only if with_icons=Y is specified in the GET request: | ||
| icon | string | SVG string for the primary icon representing the Content Type. Typically used in compact UI elements. |
| icon_name | string | Filename or identifier of the primary icon asset. |
| generic_icon | string | SVG string for a generic or illustrative icon for the Content Type, typically used in larger UI contexts (for example, tiles or previews). |
| generic_icon_name | string | Filename or identifier of the generic icon asset. |