- Home
- Resources
- Security schemes API
Abstract class for REST webservices
POST /api/admin/securityschemes
Add security scheme.
Example of request: 7 *
{"description":"scheme description","name":"scheme name"}
Request Body
media type |
data type |
description |
application/json |
SecuritySchemeTO
(JSON) |
The specification of security scheme that has to be added. |
Response Body
media type |
data type |
description |
application/json |
HdcSuccessWithId
(JSON) |
JSON Response with information, whether the adding has or has not
been succeeded. |
Example
Request
POST /api/admin/securityschemes
Content-Type: application/json
Accept: application/json
{
"name" : "...",
"description" : "...",
"id" : 12345,
"color" : "..."
}
Response
HTTP/1.1 201 Created
Content-Type: application/json
{ }
PUT /api/admin/securityschemes
Add security scheme.
Example of request: 7 *
{"description":"scheme description","name":"scheme name"}
Request Body
media type |
data type |
description |
application/json |
SecuritySchemeTO
(JSON) |
The specification of security scheme that has to be added. |
Response Body
media type |
data type |
description |
application/json |
HdcSuccessTO
(JSON) |
JSON Response with information, whether the adding has or has not
been succeeded. |
Example
Request
PUT /api/admin/securityschemes
Content-Type: application/json
Accept: application/json
{
"name" : "...",
"description" : "...",
"id" : 12345,
"color" : "..."
}
Response
HTTP/1.1 204 No Content
Content-Type: application/json
{ }
GET /api/securityschemes/json
Get list of security schemes
Response Body
media type |
data type |
description |
application/json |
object
(JSON) |
JSON Response with list of security schemes
Example of response:
{"list":[{"id":"1","description":"first scheme defined, to be used as default one","name":"general scheme", "color":"#FFFFFF"}]}
|
Example
Request
GET /api/securityschemes/json
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
...
GET /api/admin/securityschemes/json
Get list of security schemes
Response Body
media type |
data type |
description |
application/json |
object
(JSON) |
JSON Response with list of security schemes
Example of response:
{"list":[{"id":"1","description":"first scheme defined, to be used as default one","name":"general scheme","color":"#FFFFFF"}]}
|
Example
Request
GET /api/admin/securityschemes/json
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
...
DELETE /api/admin/securityschemes/{securitySchemeId}
Delete security scheme
Request Parameters
name |
type |
description |
constraints |
securitySchemeId |
path |
ID of securityScheme |
long |
Response Body
media type |
data type |
description |
application/json |
HdcSuccessTO
(JSON) |
JSON Response with information, whether the deleting has or has not
been succeeded. |
Example
Request
DELETE /api/admin/securityschemes/{securitySchemeId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 204 No Content
Content-Type: application/json
{ }
GET /api/admin/securityschemes/json/{securitySchemeId}
Get list of permissions for given security scheme
Request Parameters
name |
type |
description |
constraints |
securitySchemeId |
path |
|
long |
Response Body
media type |
data type |
description |
application/json |
object
(JSON) |
|
Example
Request
GET /api/admin/securityschemes/json/{securitySchemeId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
...
PUT /api/admin/securityschemes/setdefault/{securitySchemeId}
Set default security scheme
Request Parameters
name |
type |
description |
constraints |
securitySchemeId |
path |
ID of securityScheme |
long |
Response Body
media type |
data type |
description |
application/json |
HdcSuccessTO
(JSON) |
JSON Response with information, whether the setting has or has not
been succeeded. |
Example
Request
PUT /api/admin/securityschemes/setdefault/{securitySchemeId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 204 No Content
Content-Type: application/json
{ }
POST /api/admin/securityschemes/assign/{securitySchemeId}/{rightId}
Assign user or group to given right in security scheme
Request Parameters
name |
type |
description |
constraints |
rightId |
path |
ID of right |
long |
securitySchemeId |
path |
ID of security scheme |
long |
Request Body
media type |
data type |
application/json |
string
(JSON) |
Response Body
media type |
data type |
description |
application/json |
HdcSuccessTO
(JSON) |
JSON Response with information, whether the assignment has or has
not been succeeded. |
Example
Request
POST /api/admin/securityschemes/assign/{securitySchemeId}/{rightId}
Content-Type: application/json
Accept: application/json
...
Response
HTTP/1.1 201 Created
Content-Type: application/json
{ }
POST /api/admin/securityschemes/class/assign/{securitySchemeId}
Request Parameters
name |
type |
description |
constraints |
securitySchemeId |
path |
|
long |
Request Body
media type |
data type |
application/json |
string
(JSON) |
Response Body
media type |
data type |
description |
application/json |
HdcSuccessTO
(JSON) |
|
Example
Request
POST /api/admin/securityschemes/class/assign/{securitySchemeId}
Content-Type: application/json
Accept: application/json
...
Response
HTTP/1.1 201 Created
Content-Type: application/json
{ }
POST /api/admin/securityschemes/class/unassign/{securitySchemeId}
Request Parameters
name |
type |
description |
constraints |
securitySchemeId |
path |
|
long |
Request Body
media type |
data type |
application/json |
string
(JSON) |
Response Body
media type |
data type |
description |
application/json |
HdcSuccessTO
(JSON) |
|
Example
Request
POST /api/admin/securityschemes/class/unassign/{securitySchemeId}
Content-Type: application/json
Accept: application/json
...
Response
HTTP/1.1 201 Created
Content-Type: application/json
{ }
GET /api/admin/securityschemes/classes/json/{securitySchemeId}
Request Parameters
name |
type |
description |
constraints |
securitySchemeId |
path |
|
long |
Response Body
media type |
data type |
description |
application/json |
object
(JSON) |
|
Example
Request
GET /api/admin/securityschemes/classes/json/{securitySchemeId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
...
POST /api/admin/securityschemes/unassign/{securitySchemeId}/{rightId}
Request Parameters
name |
type |
description |
constraints |
rightId |
path |
|
long |
securitySchemeId |
path |
|
long |
Request Body
media type |
data type |
application/json |
string
(JSON) |
Response Body
media type |
data type |
description |
application/json |
HdcSuccessTO
(JSON) |
|
Example
Request
POST /api/admin/securityschemes/unassign/{securitySchemeId}/{rightId}
Content-Type: application/json
Accept: application/json
...
Response
HTTP/1.1 201 Created
Content-Type: application/json
{ }
GET /api/admin/securityschemes/members/json/{securitySchemeId}/{privilegeId}
Get list of security scheme members (users or groups) assigned to given
privilege in security scheme
Request Parameters
name |
type |
description |
constraints |
privilegeId |
path |
privilege identifier |
long |
securitySchemeId |
path |
security scheme identifier |
long |
mode |
query |
|
|
Response Body
media type |
data type |
description |
application/json |
object
(JSON) |
JSON with list of users
Example of response:
{"list":[{"id":1,"name":"admin","userFullName":"Admin","description":"","enabled":true,"email":"","loginCount":1840,"lastLoginDate":"2013-09-26T10:18:36.199072+02:00"},{"id":2,"name":"user1","userFullName":"User 1","description":"","enabled":true,"email":"","loginCount":784,"lastLoginDate":"2013-09-25T13:16:12.990218+02:00"}]}
|
Example
Request
GET /api/admin/securityschemes/members/json/{securitySchemeId}/{privilegeId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
...