model

Contents
casp102
Contents
Use the model resource to create or delete a model and to read or modify model attributes. An example that illustrates model creation is included in this section. For more information, see Example: Create a Model Based on Model Type.
The model resource operates on a single model at a time. For groups of models, use the models resource.
  • Base URL
    http://<hostname><:portnumber>/spectrum/restful/model
POST model
POST model creates a new model and returns the model handle.
  • URL
    http://<hostname><:portnumber>/spectrum/restful/model[?landscapeid=<landscape_handle>][&mtypeid=<mtype_handle>][&agentport=<snmp_port>][&commstring=<comm_str>][&retry=<retry_cnt>][&timeout=<timeout_val>][&ipaddress=<ip_address>][&parentmh=<model_handle>][&relationid=<rel_handle>][&attr=<attr_id>&val=<num>]
  • HTTP Method
    POST
  • Body
    None
  • Body Content
    Not Used
  • Header
    application/xml, application/json
  • Output
    XML or JSON listing the model handle of the created model or the error if the model cannot be created
URL Parameters
  • &landscapeid=<
    landscape_handle
    >
    (Optional) Specifies the landscape where the model will be created.
  • &mtypeid=<
    mtype_handle
    >
    (Optional) Specifies the model type handle of the model to be created. Required if the ipaddress parameter is not specified (see below).
  • &agentport=<
    snmp_port
    >
    (Optional) Specifies the SNMP management port on the device.
    Default:
    161
  • &commstring=<
    comm_str
    >
    (Optional) Specifies the community string.
    Default:
    public
  • &retry=<
    retry_cnt
    >
    (Optional) Specifies the retry count.
    Default:
    3
  • &timeout=<
    timeout_val
    >
    (Optional) Specifies the timeout value.
    Default:
    3000
  • &ipaddress=<
    ip_address
    >
    (Optional) Specifies the IP address.
  • &parentmh=<
    model_handle
    >
    (Optional) Specifies the parent (left Association) model.
  • &relationid=<
    rel_handle
    >
    (Optional) Specifies the association from the parent to this model.
    Default:
    Collects
  • &attr=<
    attr_id
    >&val=<
    num
    >
    (Optional) Specifies and attribute ID and value.
GET model
GET model reads attributes from the specified model.
  • URL
    http://<hostname><:portnumber>/spectrum/restful/model/<model_handle>[?attr=<attr_ID>]
  • HTTP Method
    GET
  • Body
    None
  • Body Content
    Not Used
  • Header
    application/xml, application/json
  • Output
    XML or JSON listing of the requested attributes
URL Parameters
  • model_handle
    Specifies the model.
  • &attr=<
    attr_ID
    >
    (Optional) Specifies the requested attributes. Multiple attribute parameters can be specified.
PUT model
PUT model updates attributes on the specified model.
  • URL
    http://<hostname><:portnumber>/spectrum/restful/model/<model_handle>?attr=<attr_ID>&val=<num>
  • HTTP Method
    PUT
  • Body
    None
  • Body Content
    Not Used
  • Header
    application/xml, application/json
  • Output
    XML or JSON listing of the requested attributes
URL Parameters
  • model_handle
    Specifies the model to update.
  • &attr=<
    attr_ID
    >&val=<
    num
    >
    Specifies the attributes and values to update. Multiple attribute-value pairs can be specified.
DELETE model
DELETE model deletes the specified model.
  • URL
    http://<hostname><:portnumber>/spectrum/restful/model/<model_handle>
  • 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
  • model_handle
    Specifies the model to delete.