Creates a role with specified permissions
POSThttps://api.spectrocloud.com/v1/roles
Creates a role with specified permissions
Request
Header Parameters
ProjectUid string
Scope the request to the specified project uid
- application/json
Body
metadata
object
spec
status
Responses
- 201
Created successfully
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
uidstringrequired
{
"uid": "string"
}
- curl
- python
- go
- nodejs
- java
- CURL
curl -L -X POST 'https://api.spectrocloud.com/v1/roles' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'ApiKey: <API_KEY_VALUE>' \
--data-raw '{
"metadata": {
"annotations": {},
"creationTimestamp": "2024-07-02T12:47:31.780Z",
"deletionTimestamp": "2024-07-02T12:47:31.780Z",
"labels": {},
"lastModifiedTimestamp": "2024-07-02T12:47:31.780Z",
"name": "string",
"uid": "string"
},
"spec": {
"permissions": [
"string"
],
"scope": "system",
"type": "system"
},
"status": {
"isEnabled": true
}
}'