Returns the list of all the Roles associated to the account of the currently connected user.
media type | data type | description |
---|---|---|
application/json | RolesResult (JSON) | The list of requested Role objects. |
application/xml | rolesResult (XML) |
GET /roles
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"Role" : [ {
"id" : 12345,
"accountId" : 12345,
"name" : "...",
"createdOn" : 12345,
"createdBy" : 12345,
"modifiedOn" : 12345,
"modifiedBy" : 12345,
"tags" : "...",
"permissions" : [ "...", "..." ],
"optlock" : 12345
}, {
"id" : 12345,
"accountId" : 12345,
"name" : "...",
"createdOn" : 12345,
"createdBy" : 12345,
"modifiedOn" : 12345,
"modifiedBy" : 12345,
"tags" : "...",
"permissions" : [ "...", "..." ],
"optlock" : 12345
} ]
}
Creates a new Role based on the information provided in RoleCreator parameter.
media type | data type | description |
---|---|---|
application/xml | roleCreator (XML) | Provides the information for the new Role to be created. |
media type | data type | description |
---|---|---|
application/xml | role (XML) | The newly created Role object. |
POST /roles
Content-Type: application/xml
Accept: application/xml
<roleCreator xmlns="http://eurotech.com/edc/2.0">
<accountId>...</accountId>
<name>...</name>
<tags>...</tags>
<permissions>
<permission>...</permission>
</permissions>
</roleCreator>
HTTP/1.1 201 Created
Content-Type: application/xml
<role xmlns="http://eurotech.com/edc/2.0">
<id>...</id>
<accountId>...</accountId>
<name>...</name>
<createdOn>...</createdOn>
<createdBy>...</createdBy>
<modifiedOn>...</modifiedOn>
<modifiedBy>...</modifiedBy>
<tags>...</tags>
<permissions>
<permission>...</permission>
</permissions>
<optlock>...</optlock>
</role>
Returns the Administrator Role for the current account.
media type | data type | description |
---|---|---|
application/json | Role (JSON) | The requested Administrator Role object. |
application/xml | role (XML) |
GET /roles/administrator
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"id" : 12345,
"accountId" : 12345,
"name" : "...",
"createdOn" : 12345,
"createdBy" : 12345,
"modifiedOn" : 12345,
"modifiedBy" : 12345,
"tags" : "...",
"permissions" : [ "...", "..." ],
"optlock" : 12345
}
Deletes the Role specified by the "id" path parameter.
name | type | description | constraints |
---|---|---|---|
roleId | path | The id of the Role to be deleted. | required |
DELETE /roles/{roleId}
Content-Type: */*
...
HTTP/1.1 204 No Content
Returns the Role specified by the "id" path parameter.
name | type | description | constraints |
---|---|---|---|
roleId | path | The id of the Role requested. | required |
media type | data type | description |
---|---|---|
application/json | Role (JSON) | The requested Role object. |
application/xml | role (XML) |
GET /roles/{roleId}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"id" : 12345,
"accountId" : 12345,
"name" : "...",
"createdOn" : 12345,
"createdBy" : 12345,
"modifiedOn" : 12345,
"modifiedBy" : 12345,
"tags" : "...",
"permissions" : [ "...", "..." ],
"optlock" : 12345
}
Updates the Role specified by the "id" path parameter based on the information provided in the Role parameter.
name | type | description |
---|---|---|
roleId | path | The id of the Role to be updated. |
media type | data type |
---|---|
application/xml | role (XML) |
media type | data type | description |
---|---|---|
application/xml | role (XML) | The updated role. |
PUT /roles/{roleId}
Content-Type: application/xml
Accept: application/xml
<role xmlns="http://eurotech.com/edc/2.0">
<id>...</id>
<accountId>...</accountId>
<name>...</name>
<createdOn>...</createdOn>
<createdBy>...</createdBy>
<modifiedOn>...</modifiedOn>
<modifiedBy>...</modifiedBy>
<tags>...</tags>
<permissions>
<permission>...</permission>
</permissions>
<optlock>...</optlock>
</role>
HTTP/1.1 204 No Content
Content-Type: application/xml
<role xmlns="http://eurotech.com/edc/2.0">
<id>...</id>
<accountId>...</accountId>
<name>...</name>
<createdOn>...</createdOn>
<createdBy>...</createdBy>
<modifiedOn>...</modifiedOn>
<modifiedBy>...</modifiedBy>
<tags>...</tags>
<permissions>
<permission>...</permission>
</permissions>
<optlock>...</optlock>
</role>