Integration API

Besides providing in-tool support to filter and explore data, Cloud Intelligence also provides powerful means to extract data and process them downstream. The Integration API provides a powerful mapping framework, allowing users to query data ad-hoc and repeating, as well as to map it to their own data structure. The Integration API can be easily called via REST as well.

1. Create a processor

Navigate to Administration - Developers - Integration API and create a new processor, make sure to select outbound.

2. Select a scope

Click "Set Scope" - and use the Wizard to select your Fact Sheets (most likely Cloud Components) by intuitive filter.

3. Select Attributes to Export

In order to export the first attribute selection, enter the following within "processors[]" - it will select the category from the Cloud Components, and add it to the exported LDIF.

{
    "scope": {
        "ids": [],
        "facetFilters": [
            {
                "keys": [
                    "CloudComponent"
                ],
                "facetKey": "FactSheetTypes",
                "operator": "OR"
            }
        ],
        "fullTextSearch": "gainsight"
    },
    "processors": [
        {
            "processorType": "outboundFactSheet",
            "processorName": "Export to LDIF",
            "fields": [
                "category"
            ],
            "output": [
                {
                    "key": {
                        "expr": "content.id"
                    },
                    "values": [
                        {
                            "expr": "${lx.factsheet.id}"
                        }
                    ]
                },
                {
                    "key": {
                        "expr": "content.type"
                    },
                    "values": [
                        {
                            "expr": "${lx.factsheet.type}"
                        }
                    ]
                },
                {
                    "key": {
                        "expr": "content.category"
                    },
                    "values": [
                        {
                            "expr": "${lx.factsheet.category}"
                        }
                    ]
                }
            ]
        }
    ]
}

Clicking on Run gives you direct access to a JSON.

📘

Hint

Click on Data Model to see available fields and relations.

4. Add more information

Once you have the first successful export, use the Outbound Processors documentation to iterate. The following processor configuration would e.g. add the relation to the Cloud Account to the output.

{
    "scope": {
        "ids": [],
        "facetFilters": [
            {
                "keys": [
                    "CloudComponent"
                ],
                "facetKey": "FactSheetTypes",
                "operator": "OR"
            }
        ],
        "fullTextSearch": "gainsight"
    },
    "processors": [
        {
            "processorType": "outboundFactSheet",
            "processorName": "Export to LDIF",
            "fields": [
                "category",
                "orgUnits"
            ],
            "relations": {
                "filter": [
                    "orgUnits"
                ],
                "targetFields": [
                    "externalId"
                ]
            },
            "output": [
                {
                    "key": {
                        "expr": "content.id"
                    },
                    "values": [
                        {
                            "expr": "${lx.factsheet.id}"
                        }
                    ]
                },
                {
                    "key": {
                        "expr": "content.type"
                    },
                    "values": [
                        {
                            "expr": "${lx.factsheet.type}"
                        }
                    ]
                },
                {
                    "key": {
                        "expr": "content.category"
                    },
                    "values": [
                        {
                            "expr": "${lx.factsheet.category}"
                        }
                    ]
                },
                {
                    "key": {
                        "expr": "cloudAccounts"
                    },
                    "mode": "list",
                    "values": [
                        {
                            "forEach": {
                                "elementOf": "${lx.factsheet.orgUnits}"
                            },
                            "map": [
                                {
                                    "key": "id",
                                    "value": "${integration.output.valueOfForEach}"
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ]
}

Did this page help you?