/{userId}/consents
Mount Point: /metadata/v1/{userId}/consents/
The following operations are supported on this resource:
POST
Adds a consent for a given application, action, purpose, and resource(s).
Parameters
name |
description |
type |
default |
userId |
The consent owner's user id.
|
path |
|
application |
The application name associated with the consent to be added. If specified, clientId cannot be used.
|
query |
|
clientId |
The OAuth client ID of the application associated with the consent to be added. If specified, application cannot be used.
|
query |
|
action |
The action name associated with the consent to be added.
|
query |
Read |
purpose |
The purpose name associated with the consent to be added.
|
query |
Any |
resource |
The resource name or URN associated with the consent to be added. Multiple values may be passed (e.g. resource=email&resource=phone) to create a consent for multiple resources.
|
query |
|
Response Body
result: |
consent |
media types: |
application/json |
Consent added to the consent store.
Status Codes
code |
description |
201 |
Success
|
404 |
No such object
|
GET
Gets consents associated with the given owner.
Parameters
name |
description |
type |
default |
userId |
The consent owner's user id.
|
path |
|
application |
The application name to filter the results by. If specified, clientId cannot be used. If neither application nor clientId is specified, records for all applications are returned.
|
query |
|
clientId |
The OAuth client ID of the application to filter the results by. If specified, application cannot be used. If neither application nor clientId is specified, records for all applications are returned.
|
query |
|
action |
The action to filter the results by, or if results are not to be filtered by action.
|
query |
|
purpose |
The purpose to filter the results by, or if results are not to be filtered by purpose.
|
query |
|
resource |
The resource Name or URN to filter the results by, or null if results are not to be filtered by resource.
|
query |
|
startIndex |
The index number of the first item to be provided in the results. A null value is equivalent to 0.
|
query |
0 |
count |
The maximum number of items to be provided in the results. A null value signifies no maximum.
|
query |
|
Response Body
result: |
consent |
media types: |
application/json |
Paged list of consents associated with the given owner and
application.
Status Codes
code |
description |
200 |
Success
|
404 |
No such object
|
DELETE
Deletes all consents associated with the given owner, by application,
action, purpose, and resource(s).
Parameters
name |
description |
type |
default |
userId |
The consent owner's user id.
|
path |
|
application |
The application name associated with the consents to be deleted. If specified, clientId cannot be used. If neither application nor clientId is specified, records for all applications are deleted.
|
query |
|
clientId |
The OAuth client ID of the application associated with the consents to be deleted. If specified, application cannot be used. If neither application nor clientId is specified, records for all applications are deleted.
|
query |
|
action |
The action associated with the consents to be deleted. Can be null to match all actions.
|
query |
|
purpose |
The purpose associated with the consents to be deleted. Can be null to match all purposes.
|
query |
|
resource |
The resource name or URN associated with the consents to be deleted. Can be null to match all resources. Multiple values may also be passed (e.g. resource=email&resource=phone). If any of the resources passed are present in a consent, the consent will be deleted (i.e. the operation is match-any).
|
query |
|
Status Codes
code |
description |
204 |
Success
|
404 |
No such object
|