Skip to content

Message Information REST API

PhilZeppe edited this page Dec 10, 2014 · 1 revision

Message Information REST API /

Message Information JSON Entity:

{
    "key": {
        "type": "TASK",
        "subtype": "REQUEST"
    },
    "purpose": "Generic task message",
    "validAnswer": "Context specific answer",
    "validAnswerTypes": [
        {
            "type": "TASK",
            "subtype": "RESPONSE"
        },
        {
            "type": "TASK",
            "subtype": "ERROR"
        }
    ],
    "relatedMessages": [
        {
            "type": "TASK",
            "subtype": "STATUS"
        }
    ]
}

REST API

GET `/?type=<type>&subtype=<subtype>` Get the message information for a message with a specific type and subtype
POST `/` Add new message information for a message with a specific type and subtype

GET /?type=<type>&subtype=<subtype>

Returns the message information for a message with a specific type and subtype.

Parameter:
type required - defines the type of the message subtype required - defines the subtype of the message

Respond:
200 message information instance is returned in the body
404 there is no message information for this type and subtype combination

POST /

Create a new message information for a given type and subtype (encoded in the body). If there is already such a message information, it will be overridden with this information.

Parameter:
body required - instance of a message information JSON object

Respond:
200 resource has been created and the created message information is returned in the body