Skip to main content
Version: v0.8.0

Update rule

PUT 

/api/management/policy/rule/:id

Update rule template

Request

Path Parameters

    id numberrequired

Bodyrequired

    idnumber
    actionstring[]required
    Example: ["READ","USE"]
    assigneestring[]
    Example: ["did:example:assignee"]
    constraints object[]required
  • Array [
  • idnumber
    typeConstraintType (string)required

    Possible values: [ATOMIC, LOGICAL]

    Example: ATOMIC
    titlestringrequired
    Example: Constraint title
    descriptionstring
    Example: Constraint description
  • ]
  • dutiesundefined[]required
    typeRuleType (string)

    Possible values: [PERMISSION, PROHIBITION, DUTY]

    targetstring

Responses

Schema
    idnumber
    actionstring[]required
    Example: ["READ","USE"]
    assigneestring[]
    Example: ["did:example:assignee"]
    constraints object[]required
  • Array [
  • idnumber
    typeConstraintType (string)required

    Possible values: [ATOMIC, LOGICAL]

    Example: ATOMIC
    titlestringrequired
    Example: Constraint title
    descriptionstring
    Example: Constraint description
  • ]
  • dutiesundefined[]required
    typeRuleType (string)

    Possible values: [PERMISSION, PROHIBITION, DUTY]

    targetstring

Authorization: oauth2

name: oauth2type: oauth2scopes: controlplane_adminflows: {
  "password": {
    "scopes": {
      "controlplane_admin": "controlplane_admin",
      "controlplane_dataplane": "controlplane_dataplane"
    }
  }
}
curl -L -X PUT 'https://tsg.dataspac.es/api/management/policy/rule/:id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"id": 0,
"action": [
"READ",
"USE"
],
"assignee": [
"did:example:assignee"
],
"constraints": [
{
"id": 0,
"type": "ATOMIC",
"title": "Constraint title",
"description": "Constraint description"
}
],
"duties": [
null
],
"type": "PERMISSION",
"target": "string"
}'
Request Collapse all
Auth
Parameters
— pathrequired
Body required
{
  "id": 0,
  "action": [
    "READ",
    "USE"
  ],
  "assignee": [
    "did:example:assignee"
  ],
  "constraints": [
    {
      "id": 0,
      "type": "ATOMIC",
      "title": "Constraint title",
      "description": "Constraint description"
    }
  ],
  "duties": [
    null
  ],
  "type": "PERMISSION",
  "target": "string"
}