Developing
Supported endpoints
You can accomplish the following goals with the supported endpoints:
Authentication and authorization
You need to authenticate with a user name and password for running the REST operations. Additionally, role-based authorization is required for authenticating into the product and running various operations.
To be able to authenticate, you need to generate the authorization token by running a POST call with the following request URL. You also need to provide the user name and password in the request body (in JSON format).
Request URL
In the preceding URL, the following definitions apply:
- <protocol> refers to the protocol that you want to use for communication with the Console Server.
The value can be one of the following:- http
- https
- <host> refers to the host name of the Console Server.
- <Port> refers to the port number of the Console Server. Default port is 9797. If the protocol is https, the port is 9443.
Output
The response is an authorization token. By default, this token is valid for a period of 60 minutes. After the default period expires, the token cannot be used, you need to generate a new token.
Required headers while running the supported endpoints
- Authorization
Pass the authorization token as the value. - Content-Type: application/json
Example
Request URL
"username": "admin",
"password": "admin12345"
}
"username": "admin",
"authToken": "6AkjnOzw9hH8/t5hUAIn7b0rbNI="
}
Logging out of a user session
You can log out and terminate a user session by sending a POST request. You also need to provide the authorization token in the request body (in JSON format).
After you log out from a given session, the authorization token generated earlier does not remain valid. Attempts to reuse the earlier generated token generates an error.
Request URL
In the preceding URL, the following definitions apply:
- <protocol> refers to the protocol that you want to use for communication with the Console Server.
The value can be one of the following:- http
- https
- <host> refers to the host name of the Console Server.
- <Port> refers to the port number of the Console Server. Default port is 9797. If the protocol is https, the port is 9443.
Required headers
- Authorization
Pass the authorization token as the value. For more information, see Authentication and authorization. - Content-Type: application/json
Example
Request URL
"Authorization": "7dNJZSao3zZKjuZ5/o1Z8Ji570Q="
}
"status": "SUCCESS"
}
HTTP status codes
The supported endpoints follow the HTTP standard for reporting status. The endpoint responses can include one of the following HTTP status codes.
For a complete list of status codes and their meaning, see Hypertext Transfer Protocol -- HTTP/1.1 status code definitions. To understand the status codes relevant to each endpoint, see the individual API topics.