# Juniper Networks Orgs NAC Portals API

**Canonical:** https://apis.io/apis/juniper/juniper-orgs-nac-portals-api/  
**Provider:** Juniper Networks — https://apis.io/providers/juniper/  
**Base URL:** netconf://[device-ip]:830  
**Documentation:** https://www.juniper.net/documentation/product/us/en/junos-pyez/

Juniper Networks Orgs NAC Portals API is one of 263 APIs that [Juniper Networks](https://apis.io/providers/juniper/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. Tagged areas include Orgs NAC Portals. The published artifact set on APIs.io includes an OpenAPI specification, an API reference, API documentation, a getting-started guide, and rate-limit docs.

NAC Portals are for onboard Wireless and Wired client with 802.1X The NAC Portal is a web-based interface that allows users to authenticate and gain access to the network. It is typically used for guest access or for devices that do not have a pre-configured certificate for 802.1X authentication. It can also be used to provision certificates for devices that require them with the Mist Application. ### NAC-Based External Guest Portal Authorization / How to implement a External Guest Portal #### Context In the guest portal flow, context such as SSID, guest MAC, AP MAC is required to unique identify the guest, if it's already authorized (e.g. roam to another AP), and used to instruct the AP to stop redirecting/blocking the user traffic #### Redirect Guest Device (or CNA in MacOS/iOS term) will be redirected to, e.g. “?ap_mac=5c5b35001234&ssid=Guest&…” | Name | Type | Description | |------|------|-------------| | ap_mac | string | AP's MAC address | | site_id | string | Site ID | | device_mac | string | Device's MAC address (the device that blocks the traffic) | | ssid | string | for wireless | | port_name | string | for wired (e.g. eth0, ge-0/0/13) | | client_mac | string | Client's MAC address | #### Authorize Once the guest has gone through your portal flow, authorize them by redirect the user to ``` GET https://url_generated_by_portal_authorize_url?jwt=<signature> ``` This can be generated by ```python import jwt secret = "EIfPMOykI3lMlDdNPub2WcbqT6dNOtWwmYHAd6bY" # from portal_authorize_jwt_secret above payload = { # for wireless "ap_mac": "5c5b35001234", "wlan_id": "be22bba7-8e22-e1cf-5185-b880816fe2cf", # only for _wireless_ captive portal "client_mac": "d58f6bb4c9d8", # for wired "device_mac": "5c5b35001234", "port_name": "eth0", # only for _wired_ captive portal" "client_mac": "d58f6bb4c9d8", # common # how long should we authorize this session "minutes": 480, "expires": 1768587994, # alternatively # instead of the original URL the user is trying to go to, redirect the user to this URL "forward": "http://www.mist.com", # for testing: if authorize_only=true and authorization is successful, 200 OK will be returned instead of 302 Redirect the user to the `forward` URL "authorize_only": False } encoded_jwt = jwt.encode(payload, secret, algorithm='HS256') ```

## Operations (11)

| Method | Path | Summary |
|---|---|---|
| GET | `/api/v1/orgs/{org_id}/nacportals` | listOrgNacPortals |
| POST | `/api/v1/orgs/{org_id}/nacportals` | createOrgNacPortal |
| DELETE | `/api/v1/orgs/{org_id}/nacportals/{nacportal_id}` | deleteOrgNacPortal |
| GET | `/api/v1/orgs/{org_id}/nacportals/{nacportal_id}` | getOrgNacPortal |
| PUT | `/api/v1/orgs/{org_id}/nacportals/{nacportal_id}` | updateOrgNacPortal |
| GET | `/api/v1/orgs/{org_id}/nacportals/{nacportal_id}/failures` | listOrgNacPortalSsoLatestFailures |
| DELETE | `/api/v1/orgs/{org_id}/nacportals/{nacportal_id}/portal_image` | deleteOrgNacPortalImage |
| POST | `/api/v1/orgs/{org_id}/nacportals/{nacportal_id}/portal_image` | uploadOrgNacPortalImage |
| PUT | `/api/v1/orgs/{org_id}/nacportals/{nacportal_id}/portal_template` | updateOrgNacPortalTemplate |
| GET | `/api/v1/orgs/{org_id}/nacportals/{nacportal_id}/saml_metadata` | getOrgNacPortalSamlMetadata |
| GET | `/api/v1/orgs/{org_id}/nacportals/{nacportal_id}/saml_metadata.xml` | downloadOrgNacPortalSamlMetadata |

## Machine-readable artifacts (11)

- **OpenAPI** — https://raw.githubusercontent.com/api-evangelist/juniper/refs/heads/main/openapi/juniper-orgs-nac-portals-api-openapi.yml
- **GitHub** — https://github.com/mistsys/mist_openapi
- **APIReference** — https://www.juniper.net/documentation/us/en/software/mist/api/http/guides/overview/overview
- **Documentation** — https://www.juniper.net/documentation/us/en/software/mist/automation-integration/index.html
- **GettingStarted** — https://www.juniper.net/documentation/us/en/software/mist/api/http/getting-started/how-to-get-started
- **Webhooks** — https://raw.githubusercontent.com/api-evangelist/juniper/refs/heads/main/asyncapi/juniper-mist-webhooks.yml
- **RateLimits** — https://raw.githubusercontent.com/api-evangelist/juniper/refs/heads/main/rate-limits/juniper-rate-limits.yml
- **ErrorCatalog** — https://raw.githubusercontent.com/api-evangelist/juniper/refs/heads/main/errors/juniper-problem-types.yml
- **Conventions** — https://raw.githubusercontent.com/api-evangelist/juniper/refs/heads/main/conventions/juniper-conventions.yml
- **DataModel** — https://raw.githubusercontent.com/api-evangelist/juniper/refs/heads/main/data-model/juniper-data-model.yml
- **StatusPage** — https://mist.statuspage.io/

## Other Juniper Networks APIs (12)

- [Junos PyEZ (Python API)](https://apis.io/apis/juniper/junos-pyez-python-api/)
- [JSNAPy API](https://apis.io/apis/juniper/jsnapy-api/)
- [Juniper Networks Allowlists and Blocklists API](https://apis.io/apis/juniper/juniper-allowlists-and-blocklists-api/)
- [Juniper Networks Analytics API](https://apis.io/apis/juniper/juniper-analytics-api/)
- [Juniper Networks Audit Logs API](https://apis.io/apis/juniper/juniper-audit-logs-api/)
- [Juniper Networks Authentication API](https://apis.io/apis/juniper/juniper-authentication-api/)
- [Juniper Networks BGP Routers API](https://apis.io/apis/juniper/juniper-bgp-routers-api/)
- [Juniper Networks Blueprints API](https://apis.io/apis/juniper/juniper-blueprints-api/)
- [Juniper Networks Clients API](https://apis.io/apis/juniper/juniper-clients-api/)
- [Juniper Networks Configlets API](https://apis.io/apis/juniper/juniper-configlets-api/)
- [Juniper Networks Configuration API](https://apis.io/apis/juniper/juniper-configuration-api/)
- [Juniper Networks Connectivity Templates API](https://apis.io/apis/juniper/juniper-connectivity-templates-api/)

## Tags

Orgs NAC Portals

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/juniper/juniper-orgs-nac-portals-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/juniper/.
