OrgsService Policies

createOrgServicePolicy

POST
/api/v1/orgs/{org_id}/servicepolicies

Create an organization-level service policy that matches tenants to services and applies an allow or deny action with optional security inspection settings.

Organization-level service policies can be imported in the gateway templates and gateway policies.

Authorization

Authorization<token>

Preferred authentication method for automation and integrations. Send the API token in the HTTP Authorization header.

Format: Authorization: Token {apitoken}

Notes:

  • An API token generated for a specific admin has the same privileges as that admin
  • An API token is automatically removed if it is not used for more than 90 days
  • SSO admins cannot generate admin API tokens. Use organization API tokens when scoped Org/Site privileges are needed.

In: header

Path Parameters

org_id*string
Formatuuid

Request Body

application/json

Organization-level service policy that allows or denies traffic for tenants and services

aamw?

Advanced anti-malware settings applied by this service policy

action?allow_deny

Allow or deny action for traffic matched by this service policy

Value in

  • "allow"
  • "deny"
antivirus?

Malware and virus inspection settings applied by this service policy

appqoe?

Application QoE settings applied by this service policy

ewf?array<>

Enhanced web filtering rules applied by this service policy

idp?

Intrusion detection and prevention settings applied by this service policy

local_routing?boolean

Whether the policy permits access within the same VRF

name?string

Display name of the service policy

path_preference?string

By default, we derive all paths available and use them, optionally, you can customize by using path_preference

secintel?

Juniper SecIntel threat intelligence settings applied by this service policy

services?array<string>

Application services or groups matched by this policy

ssl_proxy?

SSL proxy inspection settings applied by this service policy

tenants?array<string>

Application services or groups matched by this policy

Response Body

curl -X POST "https://example.com/api/v1/orgs/000000ab-00ab-00ab-00ab-0000000000ab/servicepolicies" \  -H "Content-Type: application/json" \  -d '{    "action": "allow",    "name": "string",    "services": [      "string"    ],    "tenants": [      "string"    ]  }'
{  "aamw": {    "aamwprofile_id": "33bc09a6-4dee-449e-b057-32ac9f07c9d3",    "enabled": false,    "profile": "docsonly"  },  "action": "allow",  "antivirus": {    "avprofile_id": "3b87ffd8-9336-451e-95fb-95201332ed28",    "enabled": false,    "profile": "string"  },  "appqoe": {    "enabled": false  },  "created_time": 0.1,  "ewf": [    {      "alert_only": true,      "block_message": "Access to this URL Category has been blocked",      "enabled": false,      "profile": "critical"    }  ],  "id": "53f10664-3ce8-4c27-b382-0ef66432349f",  "idp": {    "alert_only": true,    "enabled": false,    "idpprofile_id": "89b9d208-84a4-fa8f-af57-78f92c639cf2",    "profile": "strict"  },  "local_routing": true,  "modified_time": 0.1,  "name": "string",  "org_id": "a97c1b22-a4e9-411e-9bfd-d8695a0f9e61",  "path_preference": "string",  "secintel": {    "enabled": false,    "profile": "default",    "secintelprofile_id": "string"  },  "services": [    "string"  ],  "ssl_proxy": {    "ciphers_category": "medium",    "enabled": false  },  "tenants": [    "string"  ]}