POST method usage and considerations

The POST method creates an instance of a resource in the collection specified by the URI:

  • Not all resources support the POST method. See the ArubaOS-CX REST API Reference for the methods supported by each resource. The REST API must be in read/write mode to see all the POST methods supported.

  • Some resources support the POST method even when the REST API is in read-only mode.

  • When you use the POST method, the URI must point to the collection—not to the resource you are creating. The resource you are creating is sent in JSON format in the request body.

    • The JSON representation must include all fields required by the JSON model of that resource.

    • The JSON representation can contain only configuration attributes. It must not contain attributes in the status or the statistics category.

  • You can POST only one resource at a time.

  • Most resources have a hierarchical relationship. You must create the parent before you can create the child.

    For example, to create an ACL entry:

    1. The ACL must be created first by sending the JSON data of the ACL in the request body in a POST request to the URI of the acls collection:

    2. The entry can then be created by sending the JSON data of the entry in the request body in a POST request to the URI of the ACL:


    Ports and interfaces do not have a parent that is clear from the resource hierarchy. The POST method JSON models for ports and interfaces include the field referenced_by to designate this relationship.