Content Type API

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:

1. Access Admin > System > API Toolkit

2. Retrieve Content Types

  • The GET request to /api/content_type retrieves all available Content Types across Metric Insights.
  • The GET request to /api/content_type/id/<ID> retrieves the specified Content Type by its ID.
  1. Item: content_type.
  2. Method: GET.
  3. Optionally, filter the results by:
    • ID: The Content Type ID.
    • name: The name of the Content Type.
    • alias: The alias of the Content Type.
  4. with_icons: Specify whether to retrieve the information on Content Type icons.
  5. Enter an API Token
  6. [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 NameValue TypeDescription
idintegerThe ID of the Content Type.
namestringThe display name of the Content Type.
aliasstringAlternate display name of the Content Type.
descriptionstringThe description of the Content Type.
The fields below are returned only if with_icons=Y is specified in the GET request:
iconstringSVG string for the primary icon representing the Content Type. Typically used in compact UI elements.
icon_name
stringFilename or identifier of the primary icon asset.
generic_icon
stringSVG 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
stringFilename or identifier of the generic icon asset.