Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Juniper Apstra 5.1.0 User Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Property Sets (API)

Release: Juniper Apstra 5.1
{}
Change Release
date_range 21-Mar-25

For full API documentation, view the Platform API reference from the web interface. This is a targeted section to demonstrate property sets API similarly to the web interface.

Property sets live in http://aos-server:8888/api/property-sets and are referenced by ID.

content_copy zoom_out_map
    {
      "items": [
        {
          "label": "string",
          "values": {
            "additionalProp1": "string",
            "additionalProp2": "string",
            "additionalProp3": "string"
          },
          "id": "string"
        }
      ]
    }

API - Create Property Set

To create a property set, POST to https://aos-server/api/property-sets with a valid JSON structure representing the property set. Creating a property set this way only allows it to be available for assignation in the web interface - it is not required in this method for the REST API to assign to a blueprint. See the assigning a property set section for more details.

A POST will create a new property set. A PUT will overwrite an existing property set. PUT requires the URL of the property set. https://aos-server:8888/api/design/property-sets/{id}

content_copy zoom_out_map
curl -H "AuthToken: EXAMPLE" -d '{"values": {"NTP_SRV1": "192.168.1.1", "NTP_SRV1": "192.168.1.1"}, "label": "NTP-servers"}' -X POST "http://aos-server:8888/api/design/property-sets"

The response will contain the ID of the newly created property-set {"id": "73223e81-a451-4e7f-91fb-fb476f4b9fc8"}

API - Delete Property Set

Deleting a property set requires an HTTP DELETE to the property set by URL http://aos-server:8888/api/design/property-sets/{id}

content_copy zoom_out_map
curl -H "AuthToken: EXAMPLE" -X DELETE "http://aos-server:8888/api/design/property-sets/73223e81-a451-4e7f-91fb-fb476f4b9fc8"

A successful DELETE has an empty response {}

API - Assign Property Set

Assigning a property set to a blueprint requires an HTTP POST to the blueprint by URL http://aos-server:8888/api/blueprints/{blueprint_ID}/property-sets

content_copy zoom_out_map
{
     "id": "73223e81-a451-4e7f-91fb-fb476f4b9fc8"
}

The response will contain the ID of the assigned property-sets {"id": "73223e81-a451-4e7f-91fb-fb476f4b9fc8"}

CURL Example - API HTTP PUT

content_copy zoom_out_map
curl "http://aos-server:8888/api/blueprints/e4068e99-813c-4290-b7cc-e145d85a98a8/property-sets/73223e81-a451-4e7f-91fb-fb476f4b9fc8" -X DELETE -H "AuthToken: EXAMPLE"

Response

content_copy zoom_out_map
{"id": "73223e81-a451-4e7f-91fb-fb476f4b9fc8"}

API - Unassign Property Set

Deleting a property set requires an HTTP DELETE to the blueprint property set by URL http://aos-server:8888/api/blueprints/{blueprint_ID}/property-sets{id}

content_copy zoom_out_map
curl "http://aos-server:8888/api/blueprints/e4068e99-813c-4290-b7cc-e145d85a98a8/property-sets/73223e81-a451-4e7f-91fb-fb476f4b9fc8" -X DELETE -H "AuthToken: EXAMPLE"

A successful DELETE has an empty response {}

footer-navigation