cs-icon.svg

Contentstack Management - Content Types Actions

A Content Type serves as the framework or blueprint for a page or section within your web or mobile platform. It allows you to establish the fundamental structure of this blueprint by incorporating fields and configuring their attributes. By using the Contentstack Management Content Types action, you can fetch all content types from a selected stack.

Select_Content_Type_Screen.png

Let’s look at the action in detail.

Get All Content Types

This action fetches all the content types present in a stack.

  1. Under the Choose an Action tab, select the Get All Content Types action.
  2. On the Get All Content Types Configure Action page, enter the details given below:
    1. Click + Add New Account button to connect your Contentstack account as shown in the Connect your Contentstack Account to Automate step.
    2. Select a Stack, and Branch from the Lookup list. You can also include the total count of the content types and the branch details by clicking the respective checkboxes.
      Select_Fields.png

      Note: By default, the main branch is selected (even if the Branch field is empty).

    3. [Optional] Enable the Show Optional Fields toggle button to display the Content Type Limit, Customized Data (query), and Skip Content Type (Pagination) fields. Click the checkbox to include the global field schema details.
    4. Provide your data in the Customized Data (query) field to filter the retrieval of content types. Enter your data in the Key, and Value fields.

      Additional Resource: Refer to the Content Delivery API Docs for more information on Queries.

      Show_Optional_Fields.png

      Note: The Customized Data (query) field acts as a filter to fetch the content types that fulfill the specifications provided in the Key-Value fields.

  3. Once done, click Proceed.
  4. Click Test Action to test the configured action.
    Test_Action.png
  5. The output will be shown as follows. Click the Save and Exit button.
    Save_Exit_Button.png

Get a Single Content Type

This action fetches the details of a specific content type in a stack.

  1. Under the Choose an Action tab, select the Get a Single Content Type action.
  2. On the Get a Single Content Type Configure Action page, enter the details given below:
    1. Click + Add New Account button to connect your Contentstack account as shown in the Connect your Contentstack Account to Automate step.
    2. Select a Stack, Branch, and a Content Type from the Lookup list.

      Note: By default, the main branch is selected (even if the Branch field is empty).

      Select_Fields.png
    3. Optionally, enable the Show Optional Fields toggle button to display the optional fields. You can check the Include global field schema and Include branch boxes to include the details of the branch and the global field(s).
      Show_Optional_Fields.png
  3. Once done, click Proceed.
  4. Click Test Action to test the configured action.
    Test_Action.png
  5. The output will be shown as follows. Click the Save and Exit button.
    Save_and_Exit.png
Was this article helpful?
^