scopes_read
Scopes are the definition in nullplatform of a deployable runtime environment. They have a type (Kubernetes, Lambda, EC2), a configuration, and can be deployed with a release.
A scope represents a logical unit where your application assets (Docker images, Lambda functions) run and scale with the same technological specification.
Listing scopes for an application
To list the scopes of an application:
Api Call:
Method: GET
Endpoint: /scope?application_id=<application_id>
Np Cli:
np scope list --application_id <application_id>
Reading a specific scope
To get details about a specific scope:
Api Call:
Method: GET
Endpoint: /scope/:id?include_messages=true
** The include_messages=true parameter is optional but recommended to see any relevant messages or errors related to the scope.
Np Cli:
np scope read --id <scope_id>
This will show you the scope configuration, including:
- Scope type (Kubernetes, Lambda, EC2)
- Associated dimensions
- Runtime configuration
- Status
Listing deployments for a scope
To check the deployments of a scope:
Api Call:
Method: GET
Endpoint: /deployment?scope_id=<scope_id>&application_id=<application_id>
Np Cli:
np deployment list --application_id <application_id> --scope_id <scope_id>
Optionally you can add --include_messages to get all the deployment messages:
np deployment list --application_id <application_id> --scope_id <scope_id> --include_messages
Reading a specific deployment
If you want to directly get a particular deployment:
Api Call:
Method: GET
Endpoint: /deployment/:id
Np Cli:
np deployment read --id <deployment_id>
Checking scope dimensions
Dimensions help group scopes for parameter management. To see which dimensions are assigned to a scope, use the scope read command shown above. The response will include dimension information.
Common scope use cases
Scopes can be partitioned for different purposes:
- Regional distribution: Separate scopes for different geographic regions (US, EU, Asia)
- Environments: Production, staging, development environments
- Workload separation: Read vs. write workloads
- Infrastructure sizing: Different hardware specifications for different workloads