Skip to content

Commit

Permalink
Update API-design-guidelines.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rartych authored Jul 18, 2024
1 parent f9f6c49 commit b994876
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions documentation/API-design-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -1539,20 +1539,23 @@ where
Regarding scope naming for APIs, which deal with explicit subscriptions, the guidelines propose some changes as compared to the above format, and this is described below:
Scopes should be represented as below for APIs that offer explicit event subscriptions with action read and delete:
Scopes should be represented as below for APIs that offer explicit event subscriptions with action read and delete, for example:
- API Name: `device-roaming-subscriptions`
- Grant-level, action on resource: `read`, `delete`
API Name: device-roaming-subscriptions
Grant-level, action on resource: read, delete This type of formulation is not needed for the creation action.
For e.g., device-roaming-subscriptions:read
results in scope: `device-roaming-subscriptions:read`.
This type of formulation is not used for the creation action.
The format to define scopes for explicit subscriptions with action creation,
includes the event type in its formulation to ensure that consent is managed at the level of subscribed event types.
Scopes should be represented as below for APIs that offer explicit event subscriptions with action create:
Scopes should be represented as below for APIs that offer explicit event subscriptions with action create, for example:
API Name: device-roaming-subscriptions
Event-type: org.camaraproject.device-roaming-subscriptions.v0.roaming-on
Grant-level: action on resource: create
For e.g., device-roaming-subscriptions:org.camaraproject.device-roaming-subscriptions.v0.roaming-on:create
- API Name: `device-roaming-subscriptions`
- Event-type: `org.camaraproject.device-roaming-subscriptions.v0.roaming-on`
- Grant-level: action on resource: `create`
makes scope name: `device-roaming-subscriptions:org.camaraproject.device-roaming-subscriptions.v0.roaming-on:create`.
##### API-level scopes (sometimes referred to as wildcard scopes in CAMARA)
Expand Down

0 comments on commit b994876

Please sign in to comment.