This function provides a risk-free way to test the connection to the RS API and returns the API level of the servers without triggering any other actions.
URLs
GET /api/v1/apilevel
Optional parameters
Parameter can be passed in URL as ?param=value or form-encoded in the request body.
Name |
Values |
Default |
Function |
doHandshake |
true/false |
false |
|
clientApiLevel |
integer |
- |
|
format |
json/xml |
xml |
|
Result
If the doHandshake parameter is not specified or is false, or if the server is earlier than version 23.0:
▪ If the REST API has been addressed correctly (in particular correct authentication), the server response is only from the current API level (HTTP code 200).
▪ All other server responses are to be considered a bounce.
If the doHandshake parameter is set to true and a version as of 23.0 is installed as a server:
▪ If the REST API has been addressed correctly (in particular, correct authentication), the response from the server consists of a HandshakeResult object (HTTP Code 200). The content type is "text / xml" or "application / json" (depending on the format parameter).
This contains the following information:
▪ ServerApiLevel (integer): Current API level of the server
▪ IsCompatibleWithClientApiLevel (boolean): Is true if the server is compatible with the expected client API level (see clientApiLevel parameter)
▪ UserPermissions (string array): List of permissions of the current user.
Error codes (in addition to general error codes)
None.
Examples
Request: GET: /api/v1/apilevel
Response: 3
Request: GET /api/v1/apiLevel?doHandshake=true&clientApiLevel=4&format=json
Response:
{
"ServerApiLevel": 4,
"IsCompatibleWithClientApiLevel": true,
"UserPermissions": [
"AccessUI",
"ManageReportTemplates",
"ManageReportElements",
"UseTaskPlaner",
"ManageDataSources",
"ManageSystem"
]
}