1. Home
  2. Docs
  3. IzzitUp Manual
  4. Editor Guide
  5. REST API

REST API

IzzitUp allows REST API calls. This allows other applications to automatically update IzzitUp data.

At this point, an API for setting a Service’s status is available. More options may follow.

Services API

URI

…/api/services

If no request body is submitted, IzzitUp will list active and public Services. No login is required to get this result.

Note, that some services might belong to a restricted Service Group. These services will not show up in the result.

JSON

In order to perform an action on a Service, a JSON formatted request body has to be submitted.

{
    "action": "setstatus",
    "service": 2,
    "status" : 6,
    "user" : "mmouse",
    "pwd" : "password",
    "source" : "Server Monitoring",
    "message" : "Impairment detected"
}
Key Mandatory Value
action Yes Currently supported: “setstatus”
service Yes The ID of the Service to change. Call the API URI without a request body to get a list of Services and their IDs.
status The ID of the Status to change the Service to. Allowed are: 5 (Operational), 6 (Impaired) and 7 (Outage).
user Yes The username of the IzzitUp account to perform this action with
pwd Yes The password of the IzzitUp account to perform this action with
source Free text to identify the source of the REST call. The name of the event will be: Triggered by <source>
message Free text that will be added as the description of the event

Response

The API will produce a JSON formatted response. In case of success it will look similar to this:

{
    "uri": "/lewe/izzitup/app/public/api/services",
    "request": {
        "action": "setstatus",
        "service": 2,
        "status": 6,
        "user": "mmouse",
        "pwd": "password"
    },
    "result": "Success",
    "message": "Status of Service Service Desk was set to Impaired",
    "data": {
        "id": "2",
        "name": "Service Desk",
        "key": "SDSK",
        "description": "Online Service Desk",
        "url": "https://support.lewe.com/submit-ticket/",
        "curl": "https://support.lewe.com/submit-ticket/",
        "status": "6",
        "hidden": "0",
        "created": "2020-03-26 21:01:27",
        "updated": "2020-04-13 12:01:27"
    }
}


An error response will look similar to this:

{
    "uri": "/lewe/izzitup/app/public/api/services",
    "request": {
        "action": "setstatus",
        "service": 12,
        "status": 6,
        "user": "mmouse",
        "pwd": "password"
    },
    "result": "Warning",
    "message": "Service not found",
    "data": ""
}
Result Message Description
Warning Service not found A Service with the given ID does not exist.
Warning Status not found A Status with the given ID does not exist.
Warning New status not allowed. Must be 5 (Operational), 6 (Impaired) or 7 (Outage). Only the status applicable to a Service are allowed.
Warning
The requested service has an ongoing event already (impairment or outage).
An event causing an impairment or outage of the service is already ongoing.
Warning
The service X is already in status Y.
The service is already in the specified status.
Error
Incomplete request. Parameters required: action, service, user, pwd
One or more key/value pairs are missing in the JSON request.
Error
Incomplete setstatus request. Parameter required: status, source, message
One or more key/value pairs are missing in the JSON request of type “setstatus”.
Error Unknown action The value for “action” is not supported.
Error Sign in failed A sign in with the given credentials was not successful.
Error Not allowed A sign in with the given credentials was successful but the user’s role is not permitted to perform the action.

 

Was this article helpful to you? Yes No