restAuthentication
Allows Super Admins and Admins to set up REST-based authentication.
Content type: Application/json
Supported method: GET, POST, and PUT
Sample URL: http://yourfqdn/admin/service/restAuthentication
GET
Sample request
http://example.com/admin/service/restAuthentication
Sample response
{
"status":{
"code":"200",
"message":"OK"
},
"data":{
"restUrl":"https://webservice.example.com/authentication",
"assignedRoles":[
{
"roleID":1,
"roleName":"Admin",
"roleDescription":"Admin"
},
{
"roleID":3,
"roleName":"Normal",
"roleDescription":"Normal"
}
],
"restAuthConfigured":true
}
}
PUT
Sample request
{
"restUrl":"https://webservice.example.com/authentication",
"assignedRoles":[
{
"roleID":1,
"roleName":"Admin",
"roleDescription":"Admin"
},
{
"roleID":3,
"roleName":"Normal",
"roleDescription":"Normal"
}
]
}
Sample response
{
"status":{
"code":"200",
"message":"OK"
},
"data":{
"restUrl":"https://webservice.example.com/authentication",
"assignedRoles":[
{
"roleID":1,
"roleName":"Admin",
"roleDescription":"Admin"
},
{
"roleID":3,
"roleName":"Normal",
"roleDescription":"Normal"
}
],
"restAuthConfigured":true
}
}
Error responses
Status code: 405 Method Not Allowed
Status code: 400 Bad Request
POST
Sample request
{
"restUrl":"https://webservice.example.com/authentication",
"assignedRoles":[
{
"roleID":1,
"roleName":"Admin",
"roleDescription":"Admin"
},
{
"roleID":3,
"roleName":"Normal",
"roleDescription":"Normal"
}
]
}
Sample response
{
"status":{
"code":"200",
"message":"OK"
},
"data":{
"restUrl":"https://webservice.example.com/authentication",
"assignedRoles":[
{
"roleID":1,
"roleName":"Admin",
"roleDescription":"Admin"
},
{
"roleID":3,
"roleName":"Normal",
"roleDescription":"Normal"
}
],
"restAuthConfigured":true
}
}
Error responses
Status code: 405 Method Not Allowed
Status code: 400 Bad Request
Request parameter
|
Name |
Type |
Description |
Required |
|---|---|---|---|
|
restURL |
String |
URL of the REST service which will perform the authentication |
Yes |
|
assignedRoles |
List of Role Objects |
A list of roles and user types that will be affected by the REST authentication |
Yes |
|
roleID |
Integer |
Role ID |
Yes |
|
roleName |
String |
Name of the role |
No |
|
roleDescription |
String |
Describes the role |
No |
|
restAuthConfigured |
Boolean |
Indicates whether the REST authentication is enabled |
Yes |