Skip to main content

Register a Resource Capability for an RS

note

The Authorization Server maintains a directory of resources for a Resource Server at the registry endpoint:

https://AS_BASE_URL/registry/resource-server

Sample Requests

Register a Resource with a Resource Server

curl -X POST '{{WS_ADMIN_URI}}/enrolled-rs/1/rsResources' \
--header 'Content-Type: application/vnd.api+json' \
--header 'ApiVersion: v1.0' \
--header 'Authorization: {{WS_ADMIN_STATIC_TOKEN}}' \
--header 'Accept-Language: en' \
--data-raw '{
"data": {
"type": "rs-resource",
"id": 1,
"attributes": {
"identifier": "resource1_fpx-alpha"
},
"relationships": {
"resourceScopes": {
"data": [
{
"type": "resource-scope",
"id": 1
}
]
},
"resourceDefinition": {
"data": {
"type": "resource-definition",
"id": 1
}
}
}
}
}'

Get information about a Registered Resource

curl -X POST '{{WS_ADMIN_URI}}/rs-resource/1' \
--header 'Content-Type: application/vnd.api+json' \
--header 'ApiVersion: v1.0' \
--header 'Authorization: {{WS_ADMIN_STATIC_TOKEN}}' \
--header 'Accept-Language: en'

Update a Registered Resource

curl -X PATCH '{{WS_ADMIN_URI}}/rs-resource/1' \
--header 'Content-Type: application/vnd.api+json' \
--header 'ApiVersion: v1.0' \
--header 'Authorization: {{WS_ADMIN_STATIC_TOKEN}}' \
--header 'Accept-Language: en' \
--data-raw '{
"data": {
"type": "rs-resource",
"id": 1,
"attributes": {
"identifier": "resource1_fpx-alpha-new-identifier"
},
"relationships": {
"resourceScopes": {
"data": [
{
"type": "resource-scope",
"id": 1
}
]
},
"resourceDefinition": {
"data": {
"type": "resource-definition",
"id": 1
}
}
}
}
}'

Verify at the Application API: https://WALLET_BASE_URL/registry/data-sources/RS/ENROLLED_ID/resources

Request Attributes

ParameterDescriptionExample valueRequiredLocalizable
identifierA unique identifier for the resourceresource1_fpx-alphaYesNo
RelationshipDescriptionRequired
resourceScopesOne or more resource scopes to be allowed for this Resource from a particular Resource Server. See the example request above.Yes
resourceDefinitionThe Resource Definition that defines the Resource you wish to register. See the example request above.Yes