Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Our product can integrate with a variety of tools that offer additional insights into your object. By configuring new Module Plugins with the category “Insights”, MediaHaven will produce a list of reports by combining all reports across all plugins of this category.

Methods

A connector of the category “Insights” must implement the following 3 methods

  1. https://mediahaven.atlassian.net/wiki/spaces/CS/pages/4652335133/Insights+Connector+API+contract#POST-%2Fanalyze

Common

For all methods the following HTTP header is provided:

...

Analyzes the object such that insights can be requested for this object when the analysis is completed. The method is asynchronous, meaning it does not need to wait to return until the analysis is completed.

...

Response / Output

  • The HTTP response 204 No Content 202 Accepted when the analysis was successfully started

...

Example

Expand
titleInput
Code Block
languagejson
{
  "Config": {
    "CustomPropertyA" : "example"
  },
  "Metadata": {
    "Descriptive": {
        "Title": "My object",
        ...
    }
  }
}

...

Returns the list of available insights on the object without returning the detail of each insight.

Input

The input is a JSON object with uses the following propertiesHTTP parameters

PropertyParameter

Description

RecordIdrecordId

The record ID of the object in question

Config<mapping>

The custom properties configured on the plugin are passed as a sequence of parameters https://mediahaven.atlassian.net/wiki/spaces/CS/pages/4438884395/Module+Plugins#Custom-properties

Response / Output

  • 200 OK with the response

  • 409 Conflict when the analysis is still pending

  • The output is a JSON array of JSON objects with the following properties

Property

Type

Description

Name

String

The name of the insight

Id

String

The ID of the insight such that it can be requested indivudually.

Example

Input
Expand
titleInput & Output
Code Block
languagejson
{[
  "Config": {
      "CustomPropertyAName" : "exampleSummary",
  },    "RecordIdId": "SUMMARIES"11fba5aead9c4ea28b139a968f06bb2e33826b3eb5d24f57b6e13f0380617e66
  " }

Output

Code Block
[,
   {
      "Name": "SummaryWord cloud",
      "Id": "SUMMARIESWORD_CLOUD"
   },
   {
      
]

GET insights/{ID}

Returns the details of a particular insight including the raw data.

Input

  • The insight ID is specified as a path variable.

  • The input uses the following HTTP parameters

Parameter

Description

recordId

The record ID of the object in question

<mapping>

The custom properties configured on the plugin are passed as a sequence of parameters → https://mediahaven.atlassian.net/wiki/spaces/CS/pages/4438884395/Module+Plugins#Custom-properties

Response / Output

  • 200 OK with the response

  • 409 Conflict when the analysis is still pending

  • The output is a JSON object with the following properties

Property

Type

Description

Name

String

The name of the insight

Id

String

The ID of the insight such that it can be requested indivudually.

Data

String

The data of this particular insight

Example

Expand
titleOutput
Code Block
languagejson
{
  "Name": "Word cloud",
      "Id": "WORD_CLOUD",
  "Data": "<your data>"
}
]