Skip to main content
Question

Rest API V2 - Query publisher ID of a specific publisher

  • February 28, 2025
  • 7 replies
  • 120 views

Hi team, is there a way I can query a specific publisher’s publisher ID using Rest API? I am looking to automate the creation of private apps with designated publishers. It looks like publisher ID is required when creating private apps with assigned publishers. Thanks in advance! 

This topic has been closed for replies.

7 replies

Forum|alt.badge.img+7
  • Netskope Employee
  • March 2, 2025

Below REST APIv2 query can help to get the list of all or specific publisher’s details such as publisher ID.

 

https://<tenant-name>/api/v2/infrastructure/publishers?fields=publisher_id%2Cpublisher_name


  • Author
  • New Member
  • March 2, 2025

@venkatesanek , it looks like this will return all publishers and their corresponding publisher IDs. What if I only want the request to return a specific publisher’s publisher ID, what will the request look like? 


Forum|alt.badge.img+7
  • Netskope Employee
  • March 2, 2025

Yes, this REST APIv2 query will give the list of all publisher details. 

To query a specific publisher details, publisher_id field is needed. But there is no other query available to fetch the publisher_id of a specific publisher.

 


  • Author
  • New Member
  • March 3, 2025

Thanks, ​@venkatesanek. We found our own way to query the specific publisher IDs.  Is there a way I can assign 2 or more publishers to a private app in an API request? Since publisher_ID field is required when creating a private app, in publisher_ID, I declare the values of publisher IDs in array but I encounter the error below: 

"Invalid publisher id, which must be an integer."

For visualization purposes, the publisher IDs are set like these: 

   "publisher_id": [
        "123",
        "456"
      ]


  • Explorer
  • March 4, 2025

Shouldn't be many publishers inside publishers scope [] but single inside publisher scope {}? Like this:

"publishers": [
{
"publisher_id": "1",
"publisher_name": "Publisher One"
},
{
"publisher_id": "2",
"publisher_name": "Publisher Two"
}
]
 "publishers": [
{
"publisher_id": "string",
"publisher_name": "string"
}
],

notskope
  • New Member III
  • March 4, 2025

Thanks, ​@venkatesanek. We found our own way to query the specific publisher IDs.  Is there a way I can assign 2 or more publishers to a private app in an API request? Since publisher_ID field is required when creating a private app, in publisher_ID, I declare the values of publisher IDs in array but I encounter the error below: 

"Invalid publisher id, which must be an integer."

For visualization purposes, the publisher IDs are set like these: 

   "publisher_id": [
        "123",
        "456"
      ]

Here is the schema to update an app with multiple publishers:

{
"app_name": "test-app",
"host": "app.example.com",
"clientless_access": false,
"private_app_protocol": "http",
"protocols": [
{
"type": "tcp",
"ports": [
"80",
"443"
]
}
],
"publishers": [
{
"publisher_id": "17"
},
{
"publisher_id": "10"
},
{
"publisher_id": "21"
}
],
"tags": [],
"trust_self_signed_certs": "False",
"id": "15"
}

 


  • Author
  • New Member
  • March 7, 2025

@notskope ​@ppp , thanks for the clarification! This worked!