Content Insights API (1.0.0)

Download OpenAPI specification:Download

Introduction

The Content Insights API allows users to extract various information about the Design Studio resources within an environment and compose them into a single report. The report can be easily queried and be used to gain different insights, such as dependencies between resources.

The base URL for Content Insights RESTful API is https://insights.compose.platform.unifiedpost.com/api

Typical Application Flow

A typical application flow for content insight report generation is:

  1. Get access token: Fetch a OAuth Bearer token from the login server (https://login.inventivedesigners.com). This OAuth Bearer token should be provided as the Authorization header to all non-public API endpoints
  2. Start a new content insight report generation: Request a new content insight report by providing project ID and environment ID. The report is generated asynchronously. The reponse of this POST call is a report ID which will be used to retrieve the report.
  3. Retrieves a previously generated report: The GET call is used to get the status of the report generation progress. When the status field is changed from generating to generated, a link to the generated report will be available to access within 90 days.

Authentication

All requests to the Content Insights API must be authenticated. See OAuth 2.0 for information on how to obtain security tokens and Performing authenticated requests on how to use them.

The Content Insights API uses https://login.inventivedesigners.com as its authentication and authorization server.

OAuth tokens are valid for 10 minutes by default. Reuse the token across requests to save on OAuth requests.

Authorization

Users who make calls to the Content Insights API should have permission report:content-insights granted. In addition to this they should also have full access(read & write) on project://<account>/<projectname>.

Do note that all generated reports are accessible within 90 days, after this period those reports will be deleted automatically.

Example of a content insight report:

{
  "version": "1.0",
  "created": "2022-02-07T09:33:24.780Z",
  "creator": "admin",
  "projectID": "9e2efb0f-feda-406d-80d8-2716418b888e",
  "projectName": "Project_name",
  "environmentID": "46da5865-22bf-4db5-a57f-bf14421848bb",
  "environmentName": "Env_1",
  "resources": [
    {
      "type": "template",
      "name": "invitation_from_accountant",
      "extension": "sdt",
      "path": "Components/invitation_from_accountant.sdt",
      "created": "2020-07-09T06:55:06.263Z",
      "lastModified": "2022-02-07T09:17:51.505Z",
      "size": 2293665,
      "tags": {
        "Authors": "John Smith",
        "Description": "this template is used to invite accountant's clients",
        "Notes": "Add some note here",
        "department": "Finance",
        "Status": "proofchecked, ready to promote"
      },
      "pluggableObjects": [
        {
          "name": "button.html",
          "relativePath": "../components/community/button.html",
          "absolutePath": "components/community/button.html"
        },
        {
          "name": "3-steps.html",
          "relativePath": "PluggableObjects/product-notifications/3-steps.html",
          "absolutePath": "Components/PluggableObjects/product-notifications/3-steps.html"
        },
        {
          "name": "po-unsubscribe-button.html",
          "relativePath": "../department/resources/pluggable-objects/po-unsubscribe-button.html",
          "absolutePath": "department/resources/pluggable-objects/po-unsubscribe-button.html"
        }
        ],
      "contentBlocks": [
        {
          "name": "Visit-us-block.cbt",
          "relativePath": "content_blocks/Visit-us-block.cbt",
          "absolutePath": "Components/content_blocks/Visit-us-block.cbt"
        },
        {
          "name": "signature.cbt",
          "relativePath": "content_blocks/signature.cbt",
          "absolutePath": "Components/content_blocks/signature.cbt"
        },
        {
          "name": "salutation.cbt",
          "relativePath": "content_blocks/salutation.cbt",
          "absolutePath": "Components/content_blocks/salutation.cbt"
        },
        {
          "name": "login-footer-content-block.cbt",
          "relativePath": "../product/Production/content-blocks/login-footer-content-block.cbt",
          "absolutePath": "product/Production/content-blocks/login-footer-content-block.cbt"
        }
      ],
      "datamodel": {
        "name": "onboarding_invite",
        "relativePath": "onboarding_invite",
        "absolutePath": "Components/onboarding_invite"
      },
      "themes": [
        {
          "name": "Accountancy_sector Email Theme.html",
          "relativePath": "../themes/Accountancy_sector Email Theme.html",
          "absolutePath": "themes/Accountancy_sector Email Theme.html",
          "isDefault": false
        },
        {
          "name": "Demo Email Theme.html",
          "relativePath": "../../community/themes/email/Demo Email Theme.html",
          "absolutePath": "community/themes/email/Demo Email Theme.html",
          "isDefault": false
        },
        {
          "name": "Accountancy_sector Email Theme.html",
          "relativePath": "../Accountancy_sector Email Theme.html",
          "absolutePath": "Accountancy_sector Email Theme.html",
          "isDefault": true
        }
      ]
    }
  ]
}

Report

Starts a new content insight report generation

Authorizations:
authz
Request Body schema: application/json
projectID
required
string <uuid> (projectID)

The ID of the project

environmentID
required
string <uuid> (environmentID)

The ID of the environment

additionalFields
Array of strings (additionalFields)
Items Enum: "lastPromotedDate" "lastPromotedBy"

Responses

Request samples

Content type
application/json
{
  • "projectID": "4a3bdc18-db9e-4363-964a-de75946969f0",
  • "environmentID": "19e298d0-4798-4c65-8e57-d02076f7bfd6",
  • "additionalFields": [
    ]
}

Response samples

Content type
application/json
{
  • "reportID": [
    ]
}

Retrieves a previously generated report

Authorizations:
authz
path Parameters
reportID
required
string <uuid> (The unique ID of the insights report)
Example: 5b3236d3-94a1-4370-afdf-9c9d1d3a5a60

The ID of a previously created report

query Parameters
projectID
required
string <uuid> (projectID)

The ID of the project for which to generate the report

environmentID
required
string <uuid> (environmentID)

The ID of the environment for which to generate the report

Responses

Response samples

Content type
application/json
{
  • "id": [
    ],
  • "creator": "string",
  • "created": [
    ],
  • "status": "generated",
  • "href": "string"
}