Create a scope
This endpoint is used to create new scopes.
POST /openapi/v1/app_scopes
Parameters:
Name |
Type |
Description |
---|---|---|
short_name |
string |
User specified name of the scope. |
description |
string |
User specified description of the scope. |
short_query |
JSON |
Filter (or match criteria) associated with the scope. |
parent_app_scope_id |
string |
ID of the parent scope. |
policy_priority |
integer |
Default is ‘last’. Used to sort workspace priorities. See Policy Ordering under Policies. |
Sample python code
req_payload = {
"short_name": "App Scope Name",
"short_query": {
"type":"eq",
"field":"ip",
"value": <....>
},
"parent_app_scope_id": <parent_app_scope_id>
}
resp = restclient.post('/app_scopes', json_body=json.dumps(req_payload))
To create a scope based on subnet, use the following short_query:
"short_query":
{
"type":"subnet",
"field":"ip",
"value": "1.0.0.0/8"
},