associations

Contents
csp
Contents
Use the Associations/Relation resource to create, read, or delete associations.
Associations cannot be updated. To modify an association, delete the existing association and create a new one. Association operations are restricted to one
SpectroSERVER
at a time.
  • Base URL
    http://<hostname><:portnumber>/spectrum/restful/associations/relation
    The Associations noun is a pass-through noun. You must also specify the Relation noun to create, read, or delete associations.
POST associations
POST associations creates an association. A specific relation is created between two models. Only models on the same
SpectroSERVER
can be associated.
  • URL
    http://<hostname><:portnumber>/spectrum/restful/associations/relation/<rel_handle>/leftmodel/<LMhandle>/rightmodel/<RMhandle>
  • HTTP Method
    POST
  • Body
    None
  • Body Content
    Not Used
  • Header
    application/xml, application/json
  • Output
    XML or JSON listing association information
URL Parameters
  • rel_handle
    Specifies the relation handle.
  • LMhandle
    Specifies the handle of the left model in the relation.
  • RMhandle
    Specifies the handle of the right model in the relation.
To get the left or right model handle, you can use the CLI show associations command, as follows:
show associations mh=<model_handle_of_device/port>
For more information about this command, see the
Command Line Interface User Guide
.
GET associations
GET associations returns associations for a specific relation and model. Associations are read based on the side of the association that the model handle is on.
  • URL
    http://<hostname><:portnumber>/spectrum/restful/associations/relation/<rel_handle>/model/<model_handle>?side=[left|right]
  • HTTP Method
    GET
  • Body
    None
  • Body Content
    Not Used
  • Header
    application/xml, application/json
  • Output
    XML or JSON listing association information
URL Parameters
  • rel_handle
    Specifies the relation handle.
  • model_handle
    Specifies the handle of the model in the relation.
  • side=[left|right]
    Specifies the side of the association that the model handle is on.
DELETE associations
DELETE associations removes associations by deleting a specific relation between two models.
  • URL
    http://<hostname><:portnumber>/spectrum/restful/associations/relation/<rel_handle>/leftmodel/<LMhandle>/rightmodel/<RMhandle>
  • HTTP Method
    DELETE
  • Body
    None
  • Body Content
    Not Used
  • Header
    application/xml, application/json
  • Output
    XML or JSON listing indicating success or failure
URL Parameters
  • rel_handle
    Specifies the relation handle.
  • LMhandle
    Specifies the handle of the left model in the relation.
  • RMhandle
    Specifies the handle of the right model in the relation.