The /service/ endpoint is used to manage dashboard services. The following parameters are supported on this endpoint:
INPUT PARAMETERS | |
description |
The description of the service. This field is limited to 250 characters. |
group |
If services are being grouped on the dashboard, this is the group assignment for the service. This field is limited to 50 characters. |
hidden |
Whether or not the service will be shown on the dashboard. |
hidden_notifications |
Whether or not the service will be shown in user event notifications (email, SMS, webhooks). |
service_name |
The name of the service that will be displayed on the dashboard. This field is limited to 50 characters. |
Examples
List Services (List method, GET)
curl --header "Authorization:ApiKey testuser:256ee09ded99b29036fac4de96acedb7e8af7bf7" https://www.statusdashboard.com/api/v1/service/
{ "meta": { "limit": 10, "next": null, "offset": 0, "previous": null, "total_count": 3 }, "objects": [ { "group": "North America DataCenter", "resource_uri": "/api/v1/service/150/", "service_name": "Web Site", "hidden": false, "hidden_notifications": false, "description": "" }, { "group": "North America DataCenter", "resource_uri": "/api/v1/service/151/", "service_name": "Exchange Server", "hidden": false, "hidden_notifications": false, "description": "http://owa.domain.com" }, { "group": "North America DataCenter", "resource_uri": "/api/v1/service/152/", "service_name": "File Server", "hidden": false, "hidden_notifications": false, "description": "" } ] }
Upon success, you'll receive back an HTTP 200 (OK) indicating that the API call succeeded.
Add a Service (List method, POST)
curl --header "Content-Type: application/json" --header "Authorization:ApiKey testuser:256ee09ded99b29036fac4de96acedb7e8af7bf7" -X POST --data '{"group":"North America DataCenter","service_name":"Sharepoint Services"}' https://www.statusdashboard.com/api/v1/service/ { "group": "North America DataCenter", "resource_uri": "/api/v1/service/153/", "service_name": "Sharepoint Services", "hidden": false, "hidden_notifications": false, "description": "" }
Upon success, you'll receive back an HTTP 201 (created) along with details about the resource you just created. It is important to note that if you do not include a group parameter, "default" will be added for you. If you are not using instance grouping for your dashboard, then you do not need to worry about this parameter (and you can always change it later through the StatusDashboard portal, or the API).
Delete a service (Detail method, DELETE)
curl --header "Authorization:ApiKey testuser:256ee09ded99b29036fac4de96acedb7e8af7bf7" -X DELETE https://www.statusdashboard.com/api/v1/service/159/
Upon success, you'll receive back an HTTP 204 (No Content) indicating that the request was fulfilled but there is no data to display.
Get Service Details (Detail method, GET)
curl --header "Authorization:ApiKey testuser:256ee09ded99b29036fac4de96acedb7e8af7bf7" https://www.statusdashboard.com/api/v1/service/153/ { "group": "North America DataCenter", "resource_uri": "/api/v1/service/153/", "service_name": "Sharepoint Services", "hidden": false, "hidden_notifications": false, "description": "" }
Upon success, you'll receive back an HTTP 200 (OK) indicating that the API call succeeded.
Modify a Service (Detail method, PUT)
curl --header "Content-Type: application/json" --header "Authorization:ApiKey testuser:256ee09ded99b29036fac4de96acedb7e8af7bf7" -X PUT --data '{"group":"North America DataCenter","service_name":"Backup File Server"}' https://www.statusdashboard.com/api/v1/service/152/ { "group": "North America DataCenter", "resource_uri": "/api/v1/service/152/", "service_name": "Backup File Server", "hidden": false, "hidden_notifications": false, "description": "" }
Upon success, you'll receive back an HTTP 200 (OK) along with the object details, indicating that the API call succeeded and the object has been modified . Please note that if you do not include the group parameter in the PUT request, it will be reset to "default".