Centero Agent Gateway REST API provides a unified programmability model that you can use to access the data in Centero Carillon service. This REST API is available in Centero Agent Gateway service component.
Authorization
Centero Agent Gateway Rest API can be protected using REST API key and/or authentication methods available in Microsoft IIS platform (like basic authentication, Windows authentication etc.). Authorization is managed in Centero Agent Gateway web.config file with following properties in configuration\appSettings element:
Response code | Value |
REST API key | If you want to use key based authorization then generate key value that you want to use in this property. On REST API request key can be passed in request header or request URI parameter. In both methods key name is Key and value is the key value saved in web.config file. If this value is empty then key based authorizationis not used. |
REST API Users | If Microsoft IIS authentication must be used then populate all Windows user accounts that need to have access to REST API in this this property. Separate Windows user accounts with commas (,). Do not place Windows groups in this property (use REST API groups for Windows groups). Authentication type itself (like basic authentication, Windows authentication) is selected in Microsoft IIS management for Centero Agent Gateway web site. |
REST API groups | If Microsoft IIS authentication must be used then populate all Windows groups that need to have access to REST API in this this property. Separate Windows groups with commas (,). Do not place Windows user accounts in this property (use REST API users for Windows user accounts). Authentication type itself (like basic authentication, Windows authentication) is selected in Microsoft IIS management for Centero Agent Gateway web site. |
Responses
Request response for each successful request is described in request method documentation. Failure request responses contains response code and possible message for details about the failure. These are possible failure responses from Centero Agent Gateway REST API (other response codes might be also possible because of Microsoft IIS configuration, like redirect responses):
Response code | Description |
400 Bad Request | Request URI or payload contained invalid data and therefore request cannot be processed. |
401 Unauthorized | The request requires user authentication. The request MUST include a WWW-Authenticate header field containing a challenge applicable to the requested resource. |
403 Forbidden | Request was authenticated but authorization failed. Requester is not allowed to use API |
404 Not Found | Requested object not found and therefore request cannot be processed. |
500 Internal Server Error | Internal error occurred on REST API. Response body message and Centero Agent Gateway log files can help finding the cause for failure. |