Skip to content

docs(iot): IPR-2072 organization hierarchy API - #1580

Open
TomorrowMC wants to merge 2 commits into
PaloAltoNetworks:masterfrom
TomorrowMC:docs/iot-IPR-2072-organization-api
Open

TomorrowMC wants to merge 2 commits into
PaloAltoNetworks:masterfrom
TomorrowMC:docs/iot-IPR-2072-organization-api

Conversation

@TomorrowMC

Copy link
Copy Markdown

Documents the six new Device Security public endpoints for managing the organization (site group) hierarchy by name (IPR-2072):

  • GET /iot/pub/v1/organization the hierarchy as one list of { name, type, parent, path }; group and type filters
  • POST /iot/pub/v1/organization create 1-1000 groups; a parent may be a group listed earlier in the same request
  • PUT /iot/pub/v1/organization rename and/or move one group
  • DELETE /iot/pub/v1/organization delete one group; its subgroups and sites move to its parent
  • POST /iot/pub/v1/organization/sites assign sites to a group
  • DELETE /iot/pub/v1/organization/sites unassign sites from a group

Also states on GET/POST/PUT /site that a null group means the site sits directly under the top-level group.

Not to be merged until the endpoints are released.

Document the six Device Security public endpoints that read and manage the
organization (site group) hierarchy by name:

- GET    /iot/pub/v1/organization: the hierarchy as one list of
  { name, type, parent, path }, with `group` and `type` filters
- POST   /iot/pub/v1/organization: create 1-1000 groups; a parent may be a
  group listed earlier in the same request
- PUT    /iot/pub/v1/organization: rename and/or move one group
- DELETE /iot/pub/v1/organization: delete one group; its subgroups and
  sites move to its parent
- POST   /iot/pub/v1/organization/sites: assign sites to a group
- DELETE /iot/pub/v1/organization/sites: unassign sites from a group

On GET, POST and PUT /site, state that a `null` group means the site sits
directly under the top-level group.
@TomorrowMC
TomorrowMC requested a review from a team as a code owner November 9, 2026 20:20

@joey-nolan-panw joey-nolan-panw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TomorrowMC

Copy link
Copy Markdown
Author

@cnguyen1-panw Can you please help review this, thanks!

@github-actions

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit b3cdacf):

https://pan-dev-f1b58--pr1580-hk1n2tf2.web.app

(expires Tue, 17 Nov 2026 22:59:52 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 9359a9fa100d5fdb082f75280473a90b1f96eb51

Comment thread openapi-specs/iot/iot.yaml Outdated
/iot/pub/v1/organization:
get:
description: "Retrieve the organization hierarchy as one list: the top-level group (named after the tenant), its groups and subgroups, and the sites in each group, as shown on the Sites page of the Device Security GUI. <br/> Each node has its `name`, its `type` (`root`, `group` or `site`), the name of its `parent` group, and its `path` (the names from the top-level group down to the node). For a site, `name` is the site's `external_id`, the value shown as \"Name\" in the GUI. <br/> Nodes are listed depth first, and the groups and sites under each parent are sorted by name. Sites that are not in any group are listed under the top-level group, and groups without sites are included. Only the groups and sites your account can access are returned; the top-level group is always returned. <br/> Use `group` to get one group and everything beneath it, and `type` to keep one kind of node. An unknown query parameter returns HTTP 400. <br/> For customers using the IoT Standalone Portal, refer to IoT Standalone Public API Authentication page."
operationId: get-organization

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for operationId values, please follow the convention of [feature]-[method] so that all API methods for a given feature appear together in the docs nav. I'll sync with Arun to get the rest of the API docs standardized

e.g. organization-get, organization-groups-create, organization-group-update, etc.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks!

@@ -0,0 +1,41 @@
parameters:
- description: >-
Name of the group to delete. Exact, case-sensitive match on the group

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specify if subgroups will be deleted or if subgroups would be moved up a level in the hierarchy.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks!

type: string
responses:
'200':
description: Group Successfully Deleted

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If sub-groups of a group would also be deleted, this should be "Groups Successfully Deleted"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one group is deleted. Its subgroups are not deleted; they move to the parent group. So I kept "Group Successfully Deleted". I also added this to the parameter description.

$ref: '../../components/examples.yaml#/examples/MoveOrganizationGroupPayloadExample'
responses:
'200':
description: Group Successfully Updated

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this can update multiple groups, then "Groups Successfully Updated"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This API updates one group per request, so I kept "Group Successfully Updated".

parent site. `null` when the site is not in any group.
parent site. `null` when the site is not in any group; such a
site sits directly under the top-level group, which is how the
Device Security GUI and `GET /iot/pub/v1/organization` show it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this a link to the /organization API page if it exstis.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks!

Comment thread openapi-specs/iot/iot.yaml Outdated
responses:
$ref: "api/public/createOrganizationGroup.yaml#/responses"
put:
description: "Rename one group, move it under another group, or both. The group keeps its subgroups and sites, and a move takes them along. <br/> Groups are identified by name, so renaming a group changes the name that scripts and integrations must use for it. <br/> The top-level group cannot be renamed or moved. A move that would place a group under itself or one of its subgroups, or make the hierarchy deeper than five levels (counting the top-level group), returns HTTP 400. If another request moves a group at the same time and the two moves conflict, the request returns HTTP 400 without making a change; retry it. <br/> For customers using the IoT Standalone Portal, refer to IoT Standalone Public API Authentication page."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the line about the old IoT portal

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks!

Comment thread openapi-specs/iot/iot.yaml Outdated
responses:
$ref: "api/public/updateOrganizationGroup.yaml#/responses"
delete:
description: "Delete one group. Its subgroups and sites are not deleted: they move to the deleted group's parent group. Sites that move to the top-level group are no longer in any group. No site or device data is removed. <br/> The top-level group cannot be deleted. <br/> For customers using the IoT Standalone Portal, refer to IoT Standalone Public API Authentication page."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the line about the old IoT portal

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks!

Comment thread openapi-specs/iot/iot.yaml Outdated

/iot/pub/v1/organization/sites:
post:
description: "Assign up to 1000 sites to a group, by site name (`external_id`). A site belongs to one group, so each site is moved out of the group it was in. Assigning sites to the top-level group removes them from their groups. <br/> If the group or any of the sites does not exist, the request returns HTTP 400, names what is missing, and changes nothing. <br/> For customers using the IoT Standalone Portal, refer to IoT Standalone Public API Authentication page."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the line about the old IoT portal

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks!

Comment thread openapi-specs/iot/iot.yaml Outdated
responses:
$ref: "api/public/updateOrganizationGroup.yaml#/responses"
delete:
description: "Delete one group. Its subgroups and sites are not deleted: they move to the deleted group's parent group. Sites that move to the top-level group are no longer in any group. No site or device data is removed. <br/> The top-level group cannot be deleted. <br/> For customers using the IoT Standalone Portal, refer to IoT Standalone Public API Authentication page."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"...Its subgroups and sites are not deleted; the move to the deleted group's parent group. ..."

(i.e. use a semi-colon instead of a colon)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks!

Comment thread openapi-specs/iot/iot.yaml Outdated
responses:
$ref: "api/public/assignOrganizationSites.yaml#/responses"
delete:
description: "Remove up to 1000 sites from a group, by site name (`external_id`). The sites then sit directly under the top-level group. The request takes a JSON body, like the assign request. <br/> Every site must currently be in that group. Otherwise the request returns HTTP 400, names the sites that are not in the group, and changes nothing. <br/> For customers using the IoT Standalone Portal, refer to IoT Standalone Public API Authentication page."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the line about the old IoT portal.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks!

ver:
type: string
description: 'The version of the IoT Security API'
example: 'v4.0'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to check, do we have a v4? I think the examples should only use a version that we have/support

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. The API returns "ver": "v4.0" in every response. The other IoT API examples on pan.dev use the same value.

- Name the operationIds [feature]-[method] (organization-get,
  organization-groups-create, organization-group-update,
  organization-group-delete, organization-sites-assign,
  organization-sites-unassign) so the pages sit together in the docs nav
- Remove the IoT Standalone Portal sentence from the six descriptions
- Say "Device Security web interface" instead of "GUI"
- State on the delete `group` parameter that subgroups and sites move to
  the parent group
- Spell out the name rules on the update request instead of pointing to
  the create request; say "the following characters"
- Link Get Organization Hierarchy from the Get Site `group` description

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch is waiting to be deployed

1 active (outdated) and 1 waiting deployments
default — 15890f7e Waiting Nov 11, 2026 by TomorrowMC via Analyze Unsafe (javascript) #3864
preview — b3cdacfa Deployed Nov 10, 2026 by TomorrowMC via Deploy #3863
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants