Every OTbase Asset Discovery node comes with an integrated REST API that allows you to make configuration changes (such as changing access credentials for WMI or SNMP) programatically.
The REST API is particularly useful if you are operating hundreds of Asset Discovery nodes, and applying configuration changes manually e.g. via OTbase Discovery Manager proves too time consuming.
Connecting to the REST API
In order to connect to the REST API of an Asset Discovery node, open an HTTPS connection to the node's IP address and the TCP port you have configured (default: 443).
HTTPS means that your data is encrypted on transport. Asset Discovery uses a self-signed certificate, so your client software will probably notify you that the authenticity of the server cannot be verified or that the certificate is expired. Since Asset Discovery is intended to run only in trusted networks, we suggest to ignore such a warning. HTTPS is used here only for encryption, not for authentication.
Authentication
After connection establishment you have to authenticate either using Basic Authentication or OAuth2. Authentication via an LDAP account is not possible. For Basic Authentication, use the user ID and password that you have configured for the node. Configuring OAuth is explained in a separate chapter in this section.
Query methods
Method | Description |
---|---|
GET | Retrieve data |
POST | Add networks |
DELETE | Delete networks |
PUT | Change configuration / trigger an action |
Note: The content type for the body is always application/json.
Status codes
Code | Description |
---|---|
200 |
Successfully processed the request, includes a response body |
201 | Network created |
202 | Accepted the request but processing is not completed |
204 | Successfully processed the request, without a response body |
400 | An error occurred. See the response body for more information |
401 | Authorization failed |
404 | Resource not found. See the response body for more information |
405 | Method not allowed. See the response body for more information |
Comments
0 comments
Please sign in to leave a comment.