Versions Compared

Key

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

...

Expand
titleExample custom properties
Code Block
  {
    "FieldsConfig": {
      "SUMMARY": "Dynamic.PocInsights.Summary",
      "ENTITIES_PERSONS": "Dynamic.PocInsights.Persons.Person",
      "ENTITIES_ORGANISATIONS": "Dynamic.InsightsPoc.Summary",PocInsights.Organisations.Organisation",
      "ENTITIES_LOCATIONS": "Dynamic.PocInsights.Locations.Location",
      "EntitiesENTITIES_GENERAL": "Dynamic.PocInsights.InsightsPocGeneralItems.EntitiesItem",
      "ActionsACTIONS": "Dynamic.InsighstPocPocInsights.Actions.Action",
      "OcrOCR": "Dynamic.InsightsPoc.OcrPocOcr",
    }
  }

API

Common

For all methods the following HTTP header is provided:

...

The input is a JSON body with the following properties

Property

Type

Description

Metadata

Object

The standard JSON representation of the metadata as used in the MediaHaven REST API

.

: MediaHaven sidecar format

Config

Object

The custom properties configured on the plugin

, as described above: https://mediahaven.atlassian.net/wiki/spaces/CS/pages/

4438884395

4652335133/

Module+Plugins#Custom-properties

Insights+Connector+Contract#Configuration

Response / Output

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

...

Expand
titleInput
Code Block
languagejson
{
  "Config": {
    "SUMMARY": "Dynamic.PocInsights.Summary",
    "ENTITIES_PERSONS": "Dynamic.PocInsights.Persons.Person",
    "ENTITIES_ORGANISATIONS": "Dynamic.PocInsights.Organisations.Organisation",
    "ENTITIES_LOCATIONS": "Dynamic.PocInsights.Locations.Location",
    "ENTITIES_GENERAL": "Dynamic.PocInsights.GeneralItems.Item",
    "CustomPropertyA" ACTIONS": "Dynamic.PocInsights.Actions.Action",
    "OCR": "exampleDynamic.PocOcr",
  },
  "Metadata": {
    "Descriptive": {
        "Title": "My object",
        ...
    }
  }
}

...

POST insights/

Returns the list of available insights on the object

...

The input uses the following HTTP parameters

...

JSON properties

Property

Type

Description

RecordId

recordIdString

The record ID of the object in question

IncludeRawData

includeRawDataBoolean

Whether to include the raw data, by default false.

Config

<mapping>Object

The custom properties configured on the plugin are passed as a sequence of parameters → , as described above: https://mediahaven.atlassian.net/wiki/spaces/CS/pages/44388843954652335133/Module+Plugins#Custom-propertiesInsights+Connector+Contract#Configuration

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

Subproperty

Insights

Name

String

Type

Description

Insights

Array

Metadata

The

name of the insight

Insights

Id

String

The ID of the insight

Insights

Value

Array | String

The data as a string or an array of strings

standard JSON representation of the metadata as used in the MediaHaven REST API: MediaHaven sidecar format.

The generated insights, converted into metadata as instructed by the provided configuration.

RawData

String

The full raw data of the analysis; as a base64 encoded string.

Example

Expand
titleInput & Output

Input

Code Block
languagejson
{
  "InsightsConfig": [{
    {
 "SUMMARY": "Dynamic.PocInsights.Summary",
    "NameENTITIES_PERSONS": "SummaryDynamic.PocInsights.Persons.Person",
 
    "IdENTITIES_ORGANISATIONS": "SUMMARYDynamic.PocInsights.Organisations.Organisation",

     "ValueENTITIES_LOCATIONS": "This is the summary of your document..."
   }Dynamic.PocInsights.Locations.Location",
    "ENTITIES_GENERAL": "Dynamic.PocInsights.GeneralItems.Item",
   { "ACTIONS": "Dynamic.PocInsights.Actions.Action",
    "NameOCR": "EntitiesOrganisationsDynamic.PocOcr",
   },
  "IdRecordId": "ENTITIES_ORG<your Record ID>",
  "IncludeRawData": true
}

Output

Code Block
languagejson

{
  "ValueMetadata": ["The European Parliament", "Zeticon", ...]  {
    "Dynamic": {
   },   "InsightsPoc": {
        "NameSummary": "EntitiesLocationsThis is the summary of your document...",
        "IdEntitiesOrganisations": "ENTITIES_LOC", {
          "ValueOrganisation": ["GentThe European Parliament", "AntwerpZeticon", ...]
        },
        "EntitiesLocations": {
          "NameLocation": ["The European Parliament", "EntitiesPerson",Zeticon", ...]
        },
        "IdEntitiesOrganisations": "ENTITIES_PERSON", {
          "ValueOrganisation": ["AliceThe European Parliament", "BobZeticon", ...]
        },
        "EntitiesLocations": {
          "NameLocation": "EntitiesGeneral["Gent", "Antwerp", ...]
      "Id": "ENTITIES_MISC",  },
        "EntitiesGeneralItems": {
          "ValueItem": ["Document", "Paper", ...]
        },

   {     "NameActions": "Actions",{
    "Id": "ACTIONS",     "ValueAction": ["voorstellen", "afwerken", ...]
        }
      }
    }
  ]},
  "RawData": <RAW DATA>
}