Register the scope
Once you've defined your scope as a service, you need to register it in your organization so it becomes available for use.
You can do this using the CLI or the API. The name and description you set are shown to developers, and each one can be up to 60 characters long.
- CLI
- cURL
np scope type create \
--body '{
"nrn": "organization=1:account=2:namespace=3",
"type": "custom",
"name": "My scope",
"status": "active",
"description": "Description of scope",
"provider_type": "service",
"provider_id": "5f21c3d8-6b2a-4e3f-9b62-18a7c91e7d3b" // the ID of your scope specification
}'
curl -X POST "https://api.nullplatform.com/scope_type" \
-H "Content-Type: application/json" \
-d '{
"nrn": "organization=1:account=2:namespace=3",
"type": "custom",
"name": "My scope",
"status": "active",
"description": "Description of scope",
"provider_type": "service",
"provider_id": "5f21c3d8-6b2a-4e3f-9b62-18a7c91e7d3b" // the ID of your scope specification
}'
Request details
In this example:
- the scope is available to developers with access to account
2in your organization1. - it's associated with the scope specification with ID
5f21c3d8-6b2a-4e3f-9b62-18a7c91e7d3b.