- play_arrow Getting Started
- play_arrow Blueprints
- play_arrow Blueprint Analytics
- What are Blueprint Analytics
- play_arrow Dashboards
- What are Blueprint Analytics Dashboards
- Configure Auto-Enabled Blueprint Analytics Dashboards
- Instantiate Predefined Blueprint Analytics Dashboard
- Create Blueprint Analytics Dashboard
- Export Blueprint Analytics Dashboard
- Import Blueprint Analytics Dashboard
- Update Blueprint Analytics Dashboard
- Delete Blueprint Analytics Dashboard
- play_arrow Anomalies
- play_arrow Probes
- play_arrow Predefined Reports
- play_arrow Root Causes
- play_arrow Staged Datacenter Blueprints
- play_arrow Physical
- play_arrow Build
- play_arrow Topology
- play_arrow Nodes
- Nodes (Datacenter)
- Create Access Switch
- Delete Node
- Update Deploy Mode (Datacenter)
- Unassign Device (Datacenter)
- Execute CLI Show Command (Data Center Blueprint)
- play_arrow Change Hostnames / Names
- Change Assigned Interface Map
- Change Assigned ASN (Datacenter)
- Change Assigned Loopback IP Address (Datacenter)
- Edit Device Properties (Datacenter)
- Update Port Channel ID Range
- View Node's Static Routes
- Update Tags on Node (Datacenter)
- play_arrow Generic Systems (Internal/External)
- play_arrow Links
- Links (Datacenter)
- play_arrow Add Links
- play_arrow Cabling Map
- play_arrow Link Speeds
- play_arrow LAG
- Update Tags on Link (Datacenter)
- Change Assigned Link IP Addresses (Datacenter)
- Update Link Properties
- Fetch LLDP Data (Datacenter)
- Delete Link (Datacenter)
- play_arrow Interfaces
- play_arrow Racks
- play_arrow Pods
- play_arrow Planes
-
- play_arrow Virtual
- play_arrow Virtual Networks
- What are Virtual Networks
- Create Virtual Network
- Update Virtual Network Resource Assignments
- Reset Virtual Network Resource Group Override
- Import Virtual Network
- Export Virtual Network to CSV File
- Update Virtual Network Assignments
- Move Virtual Network to Different Routing Zone
- Update Virtual Network Tags
- Change Virtual Network Description
- Change Virtual Network Details
- Delete Virtual Network
- play_arrow Routing Zones
- play_arrow Static Routes
- play_arrow Protocol Sessions
- play_arrow Virtual Infrastructure
-
- play_arrow Policies
- play_arrow Endpoints
- play_arrow Security Policies
- play_arrow Interface Policies
- play_arrow Routing Policies
- play_arrow Routing Zone Constraints
- play_arrow Tenants
-
- play_arrow Data Center Interconnect (DCI)
- play_arrow Integrated Interconnect
- play_arrow Over the Top or External Gateways
- play_arrow Settings
- Update ESI MAC msb
-
- play_arrow Catalog
- play_arrow Logical Devices
- play_arrow Interface Maps
- play_arrow Property Sets
- play_arrow Configlets
- play_arrow AAA Servers
- play_arrow Tags
-
- play_arrow Tasks
- play_arrow Connectivity Templates
- Connectivity Templates Introduction
- play_arrow Primitives
- Primitive: Virtual Network (Single)
- Primitive: Virtual Network (Multiple)
- Primitive: IP Link
- Primitive: Static Route
- Primitive: Custom Static Route
- Primitive: BGP Peering (IP Endpoint)
- Primitive: BGP Peering (Generic System)
- Primitive: Dynamic BGP Peering
- Primitive: Routing Policy
- Primitive: Routing Zone Constraint
- User-defined
- Pre-defined
- Create Connectivity Template for Multiple VNs on Same Interface (Example)
- Create Connectivity Template for Layer 2 Connected External Router (Example)
- Update Connectivity Template Assignments
- Add / Remove Tags on Connectivity Template
- Update Connectivity Template
- Delete Connectivity Template
- play_arrow Fabric Settings
- play_arrow Fabric Policy
- play_arrow Severity Preferences
-
-
- play_arrow Staged Freeform Blueprints
- Freeform Introduction
- play_arrow Blueprints
- play_arrow Physical
- play_arrow Selection
- play_arrow Topology
- play_arrow Systems
- Systems Introduction (Freeform)
- Create Internal System (Freeform)
- Create External System (Freeform)
- Update Assigned Config Template(Freeform)
- Update System Name (Freeform)
- Update Hostname (Freeform)
- Change Assigned Device Profile (Freeform)
- Update System ID Assignment (Freeform)
- Update Deploy Mode (Freeform)
- Add / Remove Tags on System (Freeform)
- Delete System (Freeform)
- Device Context (Freeform)
- play_arrow Links
-
- play_arrow Resource Management
- Resource Management Introduction (Freeform)
- play_arrow Blueprint Resources
- play_arrow Allocation Groups
- play_arrow Local Pools
- play_arrow Catalog (Freeform)
- play_arrow Config Templates
- play_arrow Device Profiles
- play_arrow Property Sets
- play_arrow Tags
-
- play_arrow Tasks
- play_arrow Uncommitted Blueprints
- play_arrow Active Datacenter Blueprints
- play_arrow Time Voyager (Blueprints)
- play_arrow Devices
- Device Configuration Lifecycle
- What are Managed Devices
- Add Managed Device
- Drain Device Traffic
- Upgrade Device NOS
- Device AAA
- play_arrow Device
- play_arrow Agent
- play_arrow Pristine Config
- play_arrow Telemetry
- play_arrow Apstra ZTP
- What is Apstra ZTP
- Create User Profile for Communicating with ZTP Server
- Download and Deploy Apstra ZTP Server VM
- Configure Static Management IP Address for Apstra ZTP Server
- Replace SSL Certificate for Apstra ZTP Server GUI
- Create Vendor-specific Custom Configuration
- Configure Credentials for Apstra ZTP Server GUI
- Configure Apstra Server Connection Details
- Configure DHCP Server for Apstra ZTP
- ztp.json Keys
- Configure ztp.json with Configurator
- Configure ztp.json with CLI
- Show Apstra ZTP Logs
- Onboard Devices with Apstra ZTP
- Check ZTP Status of Devices and Services
- Reset Apstra ZTP GUI Admin Password
- Authenticate User (AZTP REST API)
- play_arrow Device Profiles
- play_arrow Design
- play_arrow Logical Devices
- play_arrow Interface Maps
- play_arrow Rack Types
- play_arrow Templates
- play_arrow Config Templates (Freeform)
- play_arrow Configlets (Datacenter)
- play_arrow Property Sets (Datacenter)
- play_arrow TCP/UDP Ports
- play_arrow Tags
-
- play_arrow Resources
- play_arrow Analytics - Telemetry
- play_arrow Analytics - Flow
- play_arrow Apstra Flow Overview
- play_arrow Dashboards
- play_arrow Supported Flow Records
- play_arrow Flow Enrichment
- play_arrow Monitor Apstra Flow
- play_arrow Configuration Reference
- play_arrow API
- play_arrow Additional Documentation
- play_arrow Knowledge Base
-
- play_arrow Analytics - Exploratory Analytics
- play_arrow External Systems (RBAC Providers)
- play_arrow Providers
- play_arrow Provider Role Mapping
-
- play_arrow Favorites & User
- play_arrow Apstra Server Management
- Apstra Server Introduction
- Monitor Apstra Server via CLI
- Restart Apstra Server
- Reset Apstra Server VM Password
- Reinstall Apstra Server
- Apstra Database Overview
- Back up Apstra Database
- Restore Apstra Database
- Reset Apstra Database
- Migrate Apstra Database
- Replace SSL Certificate on Apstra Server with Signed One
- Replace SSL Certificate on Apstra Server with Self-Signed One
- Change Apstra Server Hostname
- FIPS 140-2 Support
- play_arrow Apstra CLI Utility
- play_arrow Guides
- play_arrow References
- play_arrow Feature Matrix
- play_arrow Devices
- play_arrow Blueprint Analytics
- play_arrow Predefined Dashboards
- play_arrow Predefined Probes
- BGP Monitoring Probe
- Probe: Bandwidth Utilization
- Probe: Critical Services: Utilization, Trending, Alerting
- Probe: Device Environmental Checks
- Probe: Device System Health
- Probe: Device Telemetry Health
- Probe: Device Traffic
- Probe: Drain Traffic Anomaly
- Probe: ECMP Imbalance (External Interfaces)
- Probe: ECMP Imbalance (Fabric Interfaces)
- Probe: ECMP Imbalance (Spine to Superspine Interfaces)
- Probe: ESI Imbalance
- Probe: EVPN Host Flapping
- Probe: EVPN VXLAN Type-3 Route Validation
- Probe: EVPN VXLAN Type-5 Route Validation
- Probe: External Routes
- Probe: Hot/Cold Interface Counters (Fabric Interfaces)
- Probe: Hot/Cold Interface Counters (Specific Interfaces)
- Probe: Hot/Cold Interface Counters (Spine to Superspine Interfaces)
- Probe: Hypervisor and Fabric LAG Config Mismatch Probe (Virtual Infra)
- Hypervisor and Fabric VLAN Config Mismatch Probe
- Probe: Hypervisor MTU Mismatch Probe (Virtual Infra - NSX-T Only)
- Probe: Hypervisor MTU Threshold Check Probe (Virtual Infra)
- Probe: Hypervisor Missing LLDP Config Probe (Virtual Infra)
- Probe: Hypervisor Redundancy Checks Probe (Virtual Infra)
- Probe: Interface Flapping (Fabric Interfaces)
- Probe: Interface Flapping (Specific Interfaces)
- Probe: Interface Flapping (Specific Interfaces)
- Probe: Interface Policy 802.1x
- Probe: LAG Imbalance
- Probe: Leafs Hosting Critical Services: Utilization, Trending, Alerting
- Probe: Link Fault Tolerance in Leaf and Access LAGs
- Probe: MAC Monitor
- Probe: MLAG Imbalance
- Probe: Multiagent Detector
- Probe: Optical Transceivers
- Probe: Packet Discard Percentage
- Probe: Spine Fault Tolerance
- Probe: Total East/West Traffic
- Probe: VMs without Fabric Configured VLANs Probe (Virtual Infra)
- Probe: VXLAN Flood List Validation
- play_arrow Probe Processors
- Processor: Accumulate
- Processor: Average
- Processor: BGP Session
- Processor: Comparison
- Processor: Environment
- Processor: EVPN Type 3
- Processor: EVPN Type 5
- Processor: Extensible Service Collector
- Processor: Generic Graph Collector
- Processor: Generic Service Data Collector
- Processor: Interface Counters
- Processor: Logical Operator
- Processor: MAC
- Processor: Match Count
- Processor: Match Percentage
- Processor: Match String
- Processor: Max
- Processor: Min
- Processor: Optical Threshold
- Processor: Optical Xcvr
- Processor: Periodic Average
- Processor: Periodic Change
- Processor: Range
- Processor: Ratio
- Processor: Service Collector
- Processor: Set Comparison
- Processor: Set Count
- Processor: Standard Deviation
- Processor: State
- Processor: Subtract
- Processor: Sum
- Processor: System Utilization
- Processor: Telemetry Service Health
- Processor: Time in State
- Processor: Traffic Monitor
- Processor: Union
- Processor: VXLAN Floodlist
- Configlet Examples (Design)
- Apstra EVPN Support Addendum
- Apstra Server Configuration File
- Graph
- Juniper Apstra Tech Previews
-
ON THIS PAGE
Resource Pools (API)
This reference demonstrates the resource group API usage with parity to the UI. For full API documentation, view the REST Platform API reference under the Apstra GUI.
To list resource group slots in a blueprint, perform an authenticated HTTP GET to https://aos-server/api/blueprints/<blueprint_id>/resource_groups
Both ASN pools and IP pools must be assigned in order for a blueprint to complete the build phase.
API - ASN Pools
- Create ASN Pool
- List ASN Pools
- Delete ASN Pool
- Assign ASN to Blueprint
- Unassign ASN from Blueprint
- List ASN assigned to Blueprint
Create ASN Pool
An example payload for creating an ASN Pool:
If an ID is not specified, one will be created and returned in the HTTP response.
{ "id": "RFC6996-Private", "display_name": "RFC6996-Private", "tags": [ "default" ], "ranges": [ { "last": 65534, "first": 64512 } ] }
To create an ASN pool perform an HTTP POST to https://aos-server/api/resources/asn-pools with a JSON payload.
curl 'https://192.168.25.250/api/resources/asn-pools?comment=create' -H 'AuthToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6 ImFkbWluIiwiY3JlYXRlZF9hdCI6IjIwMTctMDUtMzFUMDA6MjI6MDcuNTIwMTgzWiIsIn Nlc3Npb24iOiJjOTliOGVlOS05Y2NjLTRjZTAtYTY5NS0wODI3N2ZkYjA0ZDYifQ.FnJMR3 crPoD0-lQRXnpPOJ8TCsRG9Wr-DaddnAIj6ko' - --data-binary '{"display_name" :"Example","ranges":[{"first":100,"last":200}],"tags":[]}' --compressed --insecure
List ASN Pools
curl 'https://192.168.25.250/api/resources/asn-pools' -H 'AuthToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiY3JlY XRlZF9hdCI6IjIwMTctMDUtMzFUMDA6MjI6MDcuNTIwMTgzWiIsInNlc3Npb24iOiJjOTliO GVlOS05Y2NjLTRjZTAtYTY5NS0wODI3N2ZkYjA0ZDYifQ.FnJMR3crPoD0-lQRXnpPOJ8TCsR G9Wr-DaddnAIj6ko' --compressed --insecure
{ "items": [ { "created_at": "2017-05-30T12:56:07.293082Z", "display_name": "Private ASN", "id": "c23ea447-8f37-419a-9b1c-c48cc55d5b9c", "last_modified_at": "2017-05-30T12:56:07.293082Z", "ranges": [ { "first": 65412, "last": 65534, "status": "pool_element_in_use" } ], "status": "in_use", "tags": [] } ] }
Delete ASN Pool
To delete an ASN Pool perform an HTTP DELETE to https://aos-server/resources/asn-pools/{pool_id}
A successful DELETE returns HTTP 200 OK.
curl 'https://192.168.25.250/api/resources/asn-pools/d0312b4a-017e-4478-8b8d-df0417ce8d3b' -X DELETE -H 'AuthToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2Vybm FtZSI6ImFkbWluIiwiY3JlYXRlZF9hdCI6IjIwMTctMDUtMzFUMDA6MjI6MDcuNTIwMTgzW iIsInNlc3Npb24iOiJjOTliOGVlOS05Y2NjLTRjZTAtYTY5NS0wODI3N2ZkYjA0ZDYifQ.FnJ MR3crPoD0-lQRXnpPOJ8TCsRG9Wr-DaddnAIj6ko' --compressed --insecure
Assign ASN to Blueprint
To assign an IP pool to the blueprint perform an HTTP PUT to https://aos-server/blueprints/<blueprint_id>/resource_groups/ip/<pool_name>
For instance, to post a resource pool to spine_loopback_ips, first obtain the ID of the resource pool, and append it to a list for slot assignation. When updating the IP Pool resource group, specify all pools in the payload at the same time. We cannot add single pools, so PUT them all at once.
Payload:
{"pool_ids": ["pool_id1", "pool_id2", "pool_id3"] }
curl 'https://192.168.25.250/api/blueprints/4c1e69c6-97bd-4c99-9504-7818f138b17f/resource_groups/asn/spine_asns' -X PUT -H 'AuthToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2Vyb mFtZSI6ImFkbWluIiwiY3JlYXRlZF9hdCI6IjIwMTctMDUtMzFUMDA6MjI6MDcuNTI wMTgzWiIsInNlc3Npb24iOiJjOTliOGVlOS05Y2NjLTRjZTAtYTY5NS0wODI3N2ZkYj A0ZDYifQ.FnJMR3crPoD0-lQRXnpPOJ8TCsRG9Wr-DaddnAIj6ko' --data-binary '{"pool_ids":["c23ea447-8f37-419a-9b1c-c48cc55d5b9c"]}' --compressed --insecure
A successful ASSIGNMENT returns HTTP 200 OK.
Unassign ASN from Blueprint
When removing IP pools from a blueprint, PUT an empty pool_id list to the
blueprint with the payload []
:
PUT to the HTTP endpoint https://aos-server/api/blueprints/<blueprint_id> /resource_groups/asn/<pool_name>
With the payload:
{ "pool_ids": [] }
curl 'https://192.168.25.250/api/blueprints/4c1e69c6-97bd-4c99-9504-7818f138b17f/resource_groups/asn/spine_asns' -X PUT -H 'AuthToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFt ZSI6ImFkbWluIiwiY3JlYXRlZF9hdCI6IjIwMTctMDUtMzFUMDA6MjI6MDcuNTIwMTgzWi IsInNlc3Npb24iOiJjOTliOGVlOS05Y2NjLTRjZTAtYTY5NS0wODI3N2ZkYjA0ZDYifQ.FnJ MR3crPoD0-lQRXnpPOJ8TCsRG9Wr-DaddnAIj6ko' --data-binary '{"pool_ids":[]}' --compressed --insecure
If the request is successful there will be no response.
List ASN assigned to Blueprint
Available ASN Pool resource groups for assignment can be shown with an HTTP GET to https://aos-server/api/blueprints/<blueprint_id>/resource_groups
curl 'https://192.168.25.250/api/blueprints/4c1e69c6-97bd-4c99-9504-7818f138b17f/resource_groups' -H 'AuthToken: eyJhbGciOiJIUzI1NwMTctMDUtMzFUMDA6MjI6MDcuNTIwMTgz WiIsInNlc3Npb24iOiJjOTliOGVlOS05Y2NjLTRjZTAtYTY5NS0wODI3N2ZkYjA0ZD YifQ.FnJMR3crPoD0-lQRXnpPOJ8TCsRG9Wr-DaddnAIj6ko' --compressed --insecure | python -m json.tool
{ "items": [ { "name": "leaf_asns", "pool_ids": [ "c23ea447-8f37-419a-9b1c-c48cc55d5b9c" ], "type": "asn" }, { "name": "spine_asns", "pool_ids": [ "c23ea447-8f37-419a-9b1c-c48cc55d5b9c" ], "type": "asn" }, { "name": "leaf_loopback_ips", "pool_ids": [ "56e8e0dc-babd-4652-92a5-fc37294a7b26" ], "type": "ip" }, { "name": "mlag_domain_svi_subnets", "pool_ids": [ "ed7d8830-c703-4ac0-8252-77e0f272a677" ], "type": "ip" }, { "name": "spine_leaf_link_ips", "pool_ids": [ "ed7d8830-c703-4ac0-8252-77e0f272a677" ], "type": "ip" }, { "name": "spine_loopback_ips", "pool_ids": [ "56e8e0dc-babd-4652-92a5-fc37294a7b26" ], "type": "ip" } ] }
API - IP Pools
- Create IP Pool
- List IP Pools
- Delete IP pool
- Assign IP to Blueprint
- Remove IP from Blueprint
- List IPs Assigned to Blueprint
Create IP Pool
JSON Payload for creating an IP Pool:
{ "id": "example_ip_pool", "display_name": "example_ip_pool", "tags": ["default"], "subnets": [ {"network": "10.0.0.0/8"} ] }
The subnets section requires a list of dictionaries with keyword network and value matching a CIDR mask. The subnets cannot overlap with each other in the same pool. That is to say, 192.168.10.0/24 and 192.168.0.0/16 cannot be configured in the same pool.
Tags are optional and are not currently used in Apstra. If ID is specified, it will be saved, otherwise an ID will be returned in the HTTP Response after creating the pool.
An HTTP POST to https://aos-server/api/resources/ip-pools with JSON payload will reply with the ID of the new IP pool.
curl 'https://192.168.25.250/api/resources/ip-pools' -X POST -H 'AuthToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmF tZSI6ImFkbWluIiwiY3JlYXRlZF9hdCI6IjIwMTctMDUtMzFUMDA6MjI6MDcuNTIwMTgzWi IsInNlc3Npb24iOiJjOTliOGVlOS05Y2NjLTRjZTAtYTY5NS0wODI3N2ZkYjA0ZDYifQ.Fn JMR3crPoD0-lQRXnpPOJ8TCsRG9Wr-DaddnAIj6ko' --data-binary '{"display_name": "example_ip_pool","subnets":[{"network":"10.0.0.0/8"},{"network": "192.168.0.0/16"}],"tags":[]}' --compressed --insecure
{"id": "d0312b4a-017e-4478-8b8d-df0417ce8d3b"}
List IP Pools
Perform an HTTP GET to https://aos-server/api/resources/ip-pools -
jp@ApstraVM ~ $ curl 'https://192.168.25.250/api/resources/ip-pools' -H 'AuthToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbW luIiwiY3JlYXRlZF9hdCI6IjIwMTctMDUtMzFUMDA6MjI6MDcuNTIwMTgzWiIsInNlc3Npb24 iOiJjOTliOGVlOS05Y2NjLTRjZTAtYTY5NS0wODI3N2ZkYjA0ZDYifQ.FnJMR3crPoD0-lQRXnpP OJ8TCsRG9Wr-DaddnAIj6ko' --compressed --insecure | python -m json.tool
{ "items": [ { "created_at": "2017-05-31T03:48:38.562331Z", "display_name": "example_ip_pool", "id": "d5046aa6-eab2-4990-9816-0a519ce1a8db", "last_modified_at": "2017-05-31T03:48:38.562331Z", "status": "not_in_use", "subnets": [ { "network": "10.0.0.0/8", "status": "pool_element_available" }, { "network": "192.168.0.0/16", "status": "pool_element_available" } ], "tags": [] }, { "created_at": "2017-05-30T12:56:50.576598Z", "display_name": "L3-CLOS", "id": "ed7d8830-c703-4ac0-8252-77e0f272a677", "last_modified_at": "2017-05-30T12:56:50.576598Z", "status": "in_use", "subnets": [ { "network": "10.16.0.0/16", "status": "pool_element_in_use" } ], "tags": [] }, { "created_at": "2017-05-30T12:56:24.222906Z", "display_name": "Loopbacks", "id": "56e8e0dc-babd-4652-92a5-fc37294a7b26", "last_modified_at": "2017-05-30T12:56:24.222906Z", "status": "in_use", "subnets": [ { "network": "10.254.0.0/16", "status": "pool_element_in_use" } ], "tags": [] }, { "created_at": "2017-05-31T03:49:15.485164Z", "display_name": "example_ip_pool", "id": "d0312b4a-017e-4478-8b8d-df0417ce8d3b", "last_modified_at": "2017-05-31T03:49:15.485164Z", "status": "not_in_use", "subnets": [ { "network": "10.0.0.0/8", "status": "pool_element_available" }, { "network": "192.168.0.0/16", "status": "pool_element_available" } ], "tags": [] } ] }
Delete IP pool
To delete an IP Pool perform an HTTP DELETE to https://aos-server/resources/ip-pools/{pool_id}
A successful DELETE returns HTTP 200 OK and an empty JSON response
{}
curl 'https://192.168.25.250/api/resources/ip-pools/d0312b4a-017e-4478-8b8d-df0417ce8d3b' -X DELETE -H 'AuthToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZS I6ImFkbWluIiwiY3JlYXRlZF9hdCI6IjIwMTctMDUtMzFUMDA6MjI6MDcuNTIwMTgzWiIsInNl c3Npb24iOiJjOTliOGVlOS05Y2NjLTRjZTAtYTY5NS0wODI3N2ZkYjA0ZDYifQ.FnJMR3crPoD0 -lQRXnpPOJ8TCsRG9Wr-DaddnAIj6ko' --compressed --insecure
Assign IP to Blueprint
To assign an IP pool to the blueprint perform an HTTP PUT to https://aos-server/blueprints/ <blueprint_id>/resource_groups/ip/<group_name>
For instance, to associate a resource pool spine_loopback_ips with a blueprint first obtain the ID of the resource pool, and append it to a list for slot assignation. When updating the IP Pool resource group, specify all pools in the payload at the same time. We cannot add single pools, so PUT them all at once. Instruct Apstra to associate IP pool with ID ‘ed7d8830-c703-4ac0-8252-77e0f272a677’to the blueprint. You may have to GET existing pool IDs prior to adding a new one to avoid deleting existing pools.
Payload:
{"pool_ids": ["pool_id1", "pool_id2", "pool_id3"] }
curl 'https://192.168.25.250/api/blueprints/4c1e69c6-97bd-4c99-9504-7818f138b17f/resource_groups/ip/spine_loopback_ips' -X PUT -H 'AuthToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImF kbWluIiwiY3JlYXRlZF9hdCI6IjIwMTctMDUtMzFUMDA6MjI6MDcuNTIwMTgzWiIsInNlc3Npb2 4iOiJjOTliOGVlOS05Y2NjLTRjZTAtYTY5NS0wODI3N2ZkYjA0ZDYifQ.FnJMR3crPoD0-lQRXnp POJ8TCsRG9Wr-DaddnAIj6ko' --data-binary '{"pool_ids":["ed7d8830-c703-4ac0-825 2-77e0f272a677"]}' --compressed --insecure
A successful ASSIGNMENT returns an HTTP 200 OK.
Remove IP from Blueprint
To remove IP pools from the blueprint PUT an empty pool_id
list
to the blueprint with the payload []
:
PUT to the HTTP endpoint https://aos-server/api/blueprints/<blueprint_id>/ resource_groups/ip/<allocation_group_name>
With the payload:
{ "pool_ids": [] }
CURL Example
curl 'https://192.168.25.250/api/blueprints/4c1e69c6-97bd-4c99-9504-7818f138b17f/resource_groups/ip/spine_loopback_ips' -X PUT -H 'AuthToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZ SI6ImFkbWluIiwiY3JlYXRlZF9hdCI6IjIwMTctMDUtMzFUMDA6MjI6MDcuNTIwMTgzWiIsI nNlc3Npb24iOiJjOTliOGVlOS05Y2NjLTRjZTAtYTY5NS0wODI3N2ZkYjA0ZDYifQ.FnJMR3cr PoD0-lQRXnpPOJ8TCsRG9Wr-DaddnAIj6ko' --data-binary '{"pool_ids":[]}' --compressed --insecure
A successful REMOVAL returns an empty response: {}
List IPs Assigned to Blueprint
curl 'https://192.168.25.250/api/blueprints/4c1e69c6-97bd-4c99-9504-7818f138b17f/resource_groups' -H 'AuthToken: eyJhbGciOiJIUzI1NwMTctMDUtMzFUMDA6MjI6MDcuNTIwMTgzWiIsInNlc3 Npb24iOiJjOTliOGVlOS05Y2NjLTRjZTAtYTY5NS0wODI3N2ZkYjA0ZDYifQ.FnJMR3crPoD 0-lQRXnpPOJ8TCsRG9Wr-DaddnAIj6ko' --compressed --insecure | python -m json.tool
{ "items": [ { "name": "leaf_asns", "pool_ids": [ "c23ea447-8f37-419a-9b1c-c48cc55d5b9c" ], "type": "asn" }, { "name": "spine_asns", "pool_ids": [ "c23ea447-8f37-419a-9b1c-c48cc55d5b9c" ], "type": "asn" }, { "name": "leaf_loopback_ips", "pool_ids": [ "56e8e0dc-babd-4652-92a5-fc37294a7b26" ], "type": "ip" }, { "name": "mlag_domain_svi_subnets", "pool_ids": [ "ed7d8830-c703-4ac0-8252-77e0f272a677" ], "type": "ip" }, { "name": "spine_leaf_link_ips", "pool_ids": [ "ed7d8830-c703-4ac0-8252-77e0f272a677" ], "type": "ip" }, { "name": "spine_loopback_ips", "pool_ids": [ "56e8e0dc-babd-4652-92a5-fc37294a7b26" ], "type": "ip" } ] }