This topic explains how to use the new REST API v2 pages in the Netskope UI for Private Access Publishers and Private Apps.
Netskope REST APIs use an auth token to make authorized calls to the API. Netskope REST APIs provide access to resources via URI paths. The token must be used in every REST API call for the tenant. The token can be created for use with specified APIs in the Netskope UI by going to Settings > Administration > Administrators & Roles > Administrators and clicking Service Account.
Create a New Token
The workflow to create a token has changed. For instructions to create a new token, go here.
Swagger API Documentation
To see API parameters information, click the API Documentation link on the REST API v2 page or in the Create REST API Token dialog box, which opens the Swagger UI. Available endpoints, methods, and parameters are displayed.
To view endpoint payload information in Swagger:
- Click on one of the endpoints, like
infrastructure, to see the parameters available. Theinfrastructureendpoints are used for the Publisher APIs.
The
steeringendpoints are used for the Private Apps APIs.
- Parameter descriptions provide information about the available values, format requirements, and factors related to use with other parameters. Some parameters provide dropdown lists for supported options, other parameters use text field entries.
- Copy the endpoint Request URL and parameters to use in your API calls. Make sure the token is added to the Netskope-Api-Token header before sending requests; otherwise, you will get an error.
Publisher APIs
List of APIs
- Create a Publisher:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/createNPAPublishers
- Get a Publisher:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/getNPAPublisherById
- Get a list of Publishers:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/getNPAPublishers
- Update a Publisher:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/replaceNPAPublisherByID
- Patch a Publisher:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/updateNPAPublisherById
- Delete a Publisher:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/deleteNPAPublishers
- Get the Publisher Alerts configuration:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/getNPAPublisherAlerts
- Update the Publisher Alerts configuration:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/createNPAPublisherAlerts
- Trigger the Bulk Update Publisher action:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/triggerNPAPublisherUpdates
- Get the List of Publisher Releases:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/getNPAPublisherObjects
- Get all Private Apps associated to a Publisher:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/getNPAPublisherApps
- Generate and retrieve a Publisher Registration token:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/generateNPAPublisherToken
API Parameters
| Key | Type | Example | Description |
|---|---|---|---|
apps_count | integer | 3 | Total Private Apps associated with Publisher. |
common_name | string | e2eabac9e9f715ff | Unique name gets generated for a Publisher. |
connected_apps | List | List [ "[Cloud Exchange]", "[WebServer]" ] | List of Private Apps connected to a Publisher. |
id | integer | 6 | Publisher ID. |
lbrokerconnect | boolean | false | Publisher Local Broker connection status. |
name | string | pub1.local | Name of the Publisher. |
publisher_upgrade_profiles_id | integer | 1 | ID of the Publisher upgrade profile. |
adminUsers | List [string] | List [ "admin1@abc.com ", "admin2@abc.com " ] | List of users present in the admin section. |
eventTypes | string (Enum) | List [ "CONNECTION_FAILED", "UPGRADE_STARTED" ] | List of event types generated by the Publisher. |
selectedUsers | string | abc@xyz.com,def@xyz.com | Additional users who need the events of Publishers. |
Publisher Upgrade Profile APIs
List of APIs
- Create a Publisher Upgrade Profile:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/createNPAPublisherUpgradeProfile
- Get a Publisher Upgrade Profile:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/getNPAPublisherUpgradeProfile
- Get a List of Publishers Upgrade Profiles:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/listNPAPublisherUpgradeProfiles
- Put a Publisher Upgrade Profile:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/updateNPAPublisherUpgradeProfile
- Delete a Publisher Upgrade Profile:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/deleteNPAPublisherUpgradeProfile
- Update a Publisher Upgrade Profile to a Set of Publishers:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/BulkupdateNPAPublishers
API Parameters
| Key | Type | Example | Description |
|---|---|---|---|
docker_tag | string | 8690 | Unique tag for each release present in docker. |
enabled | boolean | true | Status of the Publisher upgrade profile. |
frequency | string | 0 0 1 * TUE | Specifies the date time and month. |
id | integer | 10 | The unique Publisher profile ID. |
publisher_upgrade_profiles_id | integer | 1 | External ID of the Publisher profile. |
name | string | My Upgrade profile | Name of the Publisher profile. |
release_type | string | Latest | Mentions different Publisher build availability. |
timezone | string | US/Eastern | Time zones selection. |
Private Apps APIs
List of APIs
- Create a Private App:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/post_api_v2_steering_apps_private
- Get a Private App:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/get_api_v2_steering_apps_private_private_app_id_
- Get a list of Private Apps:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/get_api_v2_steering_apps_private
- Update a Private App:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/put_api_v2_steering_apps_private_private_app_id_
- Patch a Private App:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/patch_api_v2_steering_apps_private_private_app_id_
- Delete a Private App:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/delete_api_v2_steering_apps_private_private_app_id_
- Get the Policy In Use for Private Apps:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/post_api_v2_steering_apps_private_getpolicyinuse
API Parameters
| Key | Type | Example | Description |
|---|---|---|---|
token | string | "token":"<your_token>>" | Required. Obtain the REST API token from your Netskope tenant. To learn how to generate a token, go to Create a New Token. We recommend that you place the token in the request header, not in the endpoint URL. |
app_name | string | "app_name": "<application_name>" | Required. Name of the Private App(s). |
host | string | "host":"host.com" | Required. Enter an FQDN, wildcard domain, IP subnet, or IP address. |
publishers | array | "publisher_id":"office-hq""publisher_name":"of ice-private-apps" | Required. The name and/or ID of the Publisher that provides access to this application. |
private_app_id | string | "private_app_id":"office-365" | Required. The ID of the Private App being accessed. |
protocols | array | "type":"tcp""port":"80""ports":"80,8010-8050" | Required. Defines the protocol type and port(s). Type values are TCP or UDP. |
private_app_protocol | boolean | "private_app_protocol":"https" | Optional. Protocol used by the Private App. Values are HTTP or HTTPS. |
clientless_access | boolean | "clientless_access": true | Optional. Enables Browser Access for Private Apps. Values are true or false. Default is false. |
use_publisher_dns | boolean | "use_publisher_dns": true | Optional. Enables the Publisher DNS option. Values are true or false. Default is false. |
trust_self_signed_certs | boolean | "trust_self_signed_certs": true | Optional. Enable if Trusted self-signed certificates should be used for Browser Access. Values are true or false. Default is false. |
fields | string | “fields: id, name, host} | Optional. Returns the specified fields in the JSON object for the GET method. |
silent | boolean | "silent": 1 | Optional. Shows status code but skips data code. Values are 1 (true) or 0 (false). Default is 0. |
is_user_portal_app | boolean | true | Status of the user portal app. |
allow_unauthenticated_cors | boolean | false | Status of the CORS. |
uri_bypass_header-value | string | X-NSKP-URIBYPASS | URI bypass header. |
bypass_uris | [string] | ["/1/", "/2/",... "/20/"] | List of URIs to be bypassed. |
app_option | {} | Currently not in use. Ignore. | (Optional) Option used by RDP/SSH. |
tags | String [{tag_id, tag_name}] | [{tag_id, tag_name}] | List of Private app tags |
real_host | string | www.use-fqdn.com | Host used mostly for browser access based. |
NPA Real-Time Policy APIs
List of APIs
- Create an NPA Real-Time Policy:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/policy/post_api_v2_policy_npa_rules
- Get an NPA Real-Time Policy:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/policy/get_api_v2_policy_npa_rules_id_
- Get NPA Real-Time Policies:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/policy/get_api_v2_policy_npa_rules
- Patch an NPA Real-Time Policy:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/policy/patch_api_v2_policy_npa_rules_id_
- Delete an NPA Real-Time Policy:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/policy/delete_api_v2_policy_npa_rules_id_
API Parameters
| Key | Type | Example | Description |
|---|---|---|---|
description | string | This is a NPA real time policy. | Policy description. This value currently doesn’t show up in the Netskope tenant. |
enabled | string | policy_name | Status of the real time policy. |
group_id | string | 1 | Policy group ID. |
group_name | string | policy_group | Policy group name. |
rule_data | npa_policy_rule_data | Example too large to show. | Structure of the real-time policy. |
access_method | [string] Enum [Client, clientless] | [Client] | It can be client or clientless based. |
dlp_actions | {actions, dlp_profile} | {“Allow”, “Payment Card”} | Actions for DLP feature |
actions | String Enum: allow, block, alert, quarantine, bypass | [“allow”] | One of the enums to be selected. |
dlp_profile | string | “Payment Card” | These are predefined profiles. |
tss_actions | {action_name, Remediation_profile, Severity, template} | { | Actions for TSS feature. |
action_name | string Enum: [block, alert, allow] | [“alert”] | One of the enums to be selected. |
remediation_profile | string | “profile_remedy” | Not Applicable for NPA. |
severity | string Enum: [low, medium, high] | [medium] | One of the Enums to be selected. |
template | string | Default template or Custom template | Name of the block template created for user notification. |
tss_profile | [string] | Default profile or custom profile | Scanning profile for Threat protection profile. |
json_version | integer | 3 | (Optional) It’s a fixed value and will not change. |
device_classification_id | [integer] | [45] | List of device classification IDs. |
match_criteria_action | string action_name Enum [allow, block] | [“allow”] | RT policy action name. |
policy_type | string “private-app” | “private-app” | This is fixed and will not change. |
privateAppTagIds | List [string] | List [“1”,“2”] | List of tag IDs. |
privateAppTags | List [string] | List [“tag1”,“tag2”] | List of Private App tags. |
privateApps | List [string] | List [“app1”,“app2”] | List of Private App names. |
privateAppsWithActivities | File Activities with size and type. | [ | Applicable to TSS and DLP. |
userGroups | List [string] | [“user/group1/group2”] | List of group users. |
userType | string Enum: [user] | [“user”] | This is fixed and will not change. |
users | [user] | [“user@netskope.com”] | List of available users can be added. |
organization_units | List[string] | List [“engineering/qa”] | List of OUs can be added. |
rule_name | string | npa-policy-name | Real-time policy name. |
rule_order | npa_rule_order | {order,position, rule_id,rule_name} | Structure for the rule_order where the new policy to be placed. |
order | string Enum: [top, bottom, before, after] | “top” | Position where real-time policy needs to be placed. |
position | integer | 5 | (Optional) Existed rule order value. |
rule_id | integer | 1 | Existed rule ID of the policy. |
rule_name | string | policy-name | Existed policy name in rule order. |
NPA Policy Groups APIs
List of APIs
- Create NPA Policy Groups:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/policy/post_api_v2_policy_npa_policygroups
- Get an NPA Policy Group:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/policy/get_api_v2_policy_npa_policygroups_id_
- Get NPA Policy Groups:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/policy/get_api_v2_policy_npa_policygroups
- Patch NPA Policy Groups:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/policy/patch_api_v2_policy_npa_policygroups_id_
- Delete NPA Policy Groups:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/policy/delete_api_v2_policy_npa_policygroups_id_
API Parameters
| Key | Type | Example | Description |
|---|---|---|---|
group_id | integer | 4 | Policy group ID. |
group_name | string | npa-policy-group | Name of the policy group. |
group_order | It’s a structure. | {group_id: 1, "Order": before|after} | Group order structure. |
group_id | string | "1" | Group ID reference of existing group. |
order | string | "before|after" | Position where new group to be placed. |
NPA Discovery Settings APIs
List of APIs
- Create NPA Discovery Settings:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/post_api_v2_steering_apps_private_discoverysettings
- Get NPA Discovery Settings:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/get_api_v2_steering_apps_private_discoverysettings
API Parameters
| Key | Type | Example | Description |
|---|---|---|---|
host | List [string] | [“www.netskope.com”, “10.31.13.12”] | List of FQDNs and IPs can be provided. |
organization_units | List [string] | [“org/qa”] | List of Org units. |
publishers | {publisher_id, publisher_name, publisher_cn} | {“132”,“netskope_publisher”, “d48fb11de337a0 f”} | List of Publishers. |
publisher_id | string | “132” | Unique ID of the Publisher. |
publisher_name | string | netskope_publisher | Publisher name. |
publisher_cn | string | d48fb11de337a0f | Publisher common unique identifier. |
status | string Enum: [“ENABLED”, “DISABLED”] | ENABLED | Status of the app discovery. |
users | List [string] | [“abc@netskope.com”] | List of Users. |
userGroups | List [string] | [“users/group1”] | List of User groups. |
NPA Private App Publishers Association APIs
List of APIs
- Update a Publisher:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/put_api_v2_steering_apps_private_publishers
- Patch a Publisher:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/patch_api_v2_steering_apps_private_publishers
- Delete a Publisher:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/delete_api_v2_steering_apps_private_publishers
API Parameters
| Key | Type | Example | Description |
|---|---|---|---|
private_app_ids | List [string] | [“1”, “48”] | List of Private App IDs to be provided. |
publisher_ids | List [string] | [“56”, “69”] | List of Publisher IDs to be provided. |
NPA Private App Tags APIs
List of APIs
- Create Private App Tags:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/post_api_v2_steering_apps_private_tags
- Get a Private App Tag:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/get_api_v2_steering_apps_private_tags_tag_id_
- Get a list of Private App Tags:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/get_api_v2_steering_apps_private_tags
- Update a Private App Tags:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/put_api_v2_steering_apps_private_private_app_id_
- Patch a Private App Tag (Bulk Private App update):
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/patch_api_v2_steering_apps_private_tags
- Delete a Private App Tag:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/delete_api_v2_steering_apps_private_tags_tag_id_
- Delete a Private App with Tag Association:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/delete_api_v2_steering_apps_private_tags
- Get number of policies in use for private app tags:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/post_api_v2_steering_apps_private_tags_getpolicyinuse
- Update the private app tags based on the tag ID:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/steering/put_api_v2_steering_apps_private_tags_tag_id_
API Parameters
| Key | Type | Example | Description |
|---|---|---|---|
id | string | “23”, “13” | This is the Private App ID. |
tags | {[tag_name]} | [{“tag1”},{“tag2”}] | Format expected. |
tag_name | string | “tag1” | Name of the tag. |
ids | [string] | [“2”, “5”] | List of the Private App IDs. |
Local Broker APIs
List of APIs
- Create a Local Broker:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/post_api_v2_infrastructure_lbrokers
- Get a Local Broker:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/get_api_v2_infrastructure_lbrokers id_
- Get a list of Local Brokers:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/get_api_v2_infrastructure_lbrokers
- Update a Local Broker:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/put_api_v2_infrastructure_lbrokers_id_
- Delete a Local Broker:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/delete_api_v2_infrastructure_lbrokers_id_
- Create a Local Broker Hostname Config:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/post_api_v2_infrastructure_lbrokers_brokerconfig
- Update a Local Broker Hostname Config:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/put_api_v2_infrastructure_lbrokers_brokerconfig
- Get a Local Broker Hostname Config:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/get_api_v2_infrastructure_lbrokers_brokerconfig
- Generate and Retrieve the Local Broker Registration Token:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/post_api_v2_infrastructure_lbrokers_id_registrationtoken
- Check if the Name provided is a Valid Duplicate or not:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/get_api_v2_infrastructure_npa_namevalidation
- Validate the Resource based on resourcetype:
https://<tenant-URL>/apidocs/?include_beta_routes=1#/infrastructure/post_api_v2_infrastructure_npa_resource_validation_resourcetype_
API Parameters
| Key | Type | Example | Description |
|---|---|---|---|
name | string | localbroker1 | Name of the Local Broker. |
common_name | string | d48fb11de337a0f | Local broker common name |
id | integer | 45 | Unique ID of the Local Broker. |
registered | boolean | true | Status of the Local Broker registration. |
hostname | string | www.localconnect.com | FQDN of the Local Broker DNS. |

