Define a new capability

post/capabilities
Internal-Use Only

Creates a new capability. If a Capability with the same name already exists then 201 status is returned and the Location header contains the URI for the existing Capability.

Request Samples

1

Response Samples

1{
2 "id": "4d80eebd-db26-4ee9-beff-a1ce51c24d9f",
3 "name": "sas.audit.report",
4 "uri": "/capability/sas/audit/report",
5 "description": "Grants access to run audit reports.",
6 "product": "va",
7 "version": 1,
8 "links": [
9 {
10 "method": "GET",
11 "rel": "self",
12 "href": "/autorization/capabilities/sas.audit.report",
13 "uri": "/autorization/capabilities/sas.audit.report",
14 "responseType": "application/vnd.sas.authorization.capability"
15 }
16 ],
17 "principals": [
18 {
19 "version": 2,
20 "name": "sviadms",
21 "type": "group"
22 }
23 ]
24}

Request Body

The group to assign the capability to

A summary object of the capability

NameTypeRequiredDescription
id
string
false

The system-assigned unique ID for this capability.

name
string
true

The full stop separated name for this capability e.g. sas.document.edit

description
string
true

The description of the capability

product
string
false

The product associated with the capability.

version
integer<int32>
false

The schema version for the capability.

links
array [Link]
false

Zero or more link objects relevant to the capability.

Responses

StatusMeaningDescription
201CreatedCapability has been createdHeadersSchema
400Bad RequestBad request.Schema
403ForbiddenForbidden. The user does not have the required sas.capability.create capability.Schema