Skip to content

Views

Service Id: platform6.views

1. Get List Of View Configuration Items

Header key Description Value
platform6.request.action The action to perform (required) list

_A valid response will be:

Header key Description
platform6.response.status OK
platform6.response.value JSON List: The list of views

Example

def cm = [ headers: [ 'platform6.request.action': 'list' ] ]

print p6.service.request('platform6.views', cm).headers['platform6.response.value']

The response will be:

[
    {
        "name": "Logging Event",
        "descriptionMap": {
            "EN": "Logging Event",
            "FR": "Événement de log"
        },
        "tags": { "": "" },
        "dataType": "logging_event",
        "dataModel": "",
        "dataPartition": "LOG",
        "reprocessRouteUri": "",
        "keys": [
            {
                "name": "ID",
                "descriptionMap": {
                    "EN": "Id",
                    "FR": "Identifiant"
                },
                "xPath": "logging_event/id",
                "xPaths": null
            }
        ],
        "viewables": [
            {
                "name": "Creation Date",
                "descriptionMap": {
                    "EN": "Creation Date",
                    "FR": "Date de Création"
                },
                "xPath": "logging_event/time",
                "xPaths": null,
                "type": "Date(yyyy'-'MM'-'dd' 'HH:mm:ss.S z)",
                "defaultValue": null,
                "choiceValues": null,
                "displayChoiceValues": null,
                "typeAttributes": null,
                "choiceAttributes": null,
                "displayChoiceAttributes": null
            },
            {
                "name": "ID",
                "descriptionMap": {
                    "EN": "ID",
                    "FR": "Identifiant"
                },
                "xPath": "logging_event/id",
                "xPaths": null,
                "type": "String",
                "defaultValue": null,
                "choiceValues": null,
                "displayChoiceValues": null,
                "typeAttributes": null,
                "choiceAttributes": null,
                "displayChoiceAttributes": null
            },
            {
                "name": "Logger",
                "descriptionMap": {
                    "EN": "Logger",
                    "FR": "logger"
                },
                "xPath": "logging_event/logger",
                "xPaths": null,
                "type": "String",
                "defaultValue": null,
                "choiceValues": null,
                "displayChoiceValues": null,
                "typeAttributes": null,
                "choiceAttributes": null,
                "displayChoiceAttributes": null
            },
            {
                "name": "Message",
                "descriptionMap": {
                    "EN": "Message",
                    "FR": "Message"
                },
                "xPath": "logging_event/message",
                "xPaths": null,
                "type": "String",
                "defaultValue": null,
                "choiceValues": null,
                "displayChoiceValues": null,
                "typeAttributes": null,
                "choiceAttributes": null,
                "displayChoiceAttributes": null
            },
            {
                "name": "Level",
                "descriptionMap": {
                    "EN": "Level",
                    "FR": "Level"
                },
                "xPath": "logging_event/level",
                "xPaths": null,
                "type": "String",
                "defaultValue": null,
                "choiceValues": null,
                "displayChoiceValues": null,
                "typeAttributes": null,
                "choiceAttributes": null,
                "displayChoiceAttributes": null
            }
        ],
        "searchables": [
            {
                "name": "Creation Date",
                "descriptionMap": {
                    "EN": "Creation Date",
                    "FR": "Date de Création"
                },
                "xPath": "logging_event/time",
                "xPaths": null,
                "type": "RangeOfDates(yyyy'-'MM'-'dd' 'HH:mm:ss.S z)",
                "defaultValue": null,
                "choiceValues": null,
                "displayChoiceValues": null,
                "typeAttributes": {},
                "choiceAttributes": {},
                "displayChoiceAttributes": {}
            },
            {
                "name": "ID",
                "descriptionMap": {
                    "EN": "ID",
                    "FR": "Identifiant"
                },
                "xPath": "logging_event/id",
                "xPaths": null,
                "type": "Words",
                "defaultValue": null,
                "choiceValues": null,
                "displayChoiceValues": null,
                "typeAttributes": {},
                "choiceAttributes": {},
                "displayChoiceAttributes": {}
            },
            {
                "name": "Logger",
                "descriptionMap": {
                    "EN": "Logger",
                    "FR": "logger"
                },
                "xPath": "logging_event/logger",
                "xPaths": null,
                "type": "Words",
                "defaultValue": null,
                "choiceValues": null,
                "displayChoiceValues": null,
                "typeAttributes": {},
                "choiceAttributes": {},
                "displayChoiceAttributes": {}
            },
            {
                "name": "Message",
                "descriptionMap": {
                    "EN": "Message",
                    "FR": "Message"
                },
                "xPath": "logging_event/message",
                "xPaths": null,
                "type": "Words",
                "defaultValue": null,
                "choiceValues": null,
                "displayChoiceValues": null,
                "typeAttributes": {},
                "choiceAttributes": {},
                "displayChoiceAttributes": {}
            },
            {
                "name": "AnyField",
                "descriptionMap": {
                    "EN": "Contains the words",
                    "FR": "Contient les mots"
                },
                "xPath": "logging_event",
                "xPaths": null,
                "type": "Words",
                "defaultValue": null,
                "choiceValues": null,
                "displayChoiceValues": null,
                "typeAttributes": {},
                "choiceAttributes": {},
                "displayChoiceAttributes": {}
            }
        ]
    }
]

2. Get View Configuration Item as XML given Name and AppKey

Header key Description Value
platform6.request.action The action to perform (required) getXmlView
viewName Name of View Service Item (required)
appKey AppKey of View Service Item (required)

_A valid response will be:

Header key Description
platform6.response.status OK
platform6.response.value [xml view]

3. Update The View Configuration Item XML given Name and AppKey

Header key Description Value
platform6.request.action The action to perform (required) updateXmlView
viewName Name of View Service Item (required)
appKey AppKey of View Service Item (required)
viewXml XML Definition of View Service Item (required)

_A valid response will be:

Header key Description
platform6.response.status OK

4. Update Indexes Associated with the View Configuration given Name and AppKey

Header key Description Value
platform6.request.action The action to perform (required) updateViewIndexes
viewName Name of View Service Item (required)
appKey AppKey of View Service Item (required)

_A valid response will be:

Header key Description
platform6.response.status OK
platform6.response.value [job id of index job]