Skip to main content

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.

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
}'
Request details

In this example:

  • the scope is available to developers with access to account 2 in your organization 1.
  • it's associated with the scope specification with ID 5f21c3d8-6b2a-4e3f-9b62-18a7c91e7d3b.