Unsupported content

 

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Passing input parameters with an API request

Some API requests take input parameters. You pass the input parameters via an array object named operationParams that you include in the HTTP request message body JSON document. Each array element is an OperationParameter object that specifies one input parameter.

OperationParameter object

The OperationParameter object is a wrapper for an input parameter passed to an operation via an operationParams array. The following table describes the components of an OperationParameter object.

OperationParameter object components

Example of a request with input parameters

The following example shows a service offering instance onboard request that has input parameters. The input parameters for this request are: virtualGuest, serviceOffering, networkContainerID, tenant, decommissionDate, owner, and hostedResource. The input parameters that are standard Java object types (networkContainerID, tenant, decommissionDate, and owner) contain only one object in the value component of the OperationParameter object. The input parameters that are BMC Cloud Lifecycle Management class objects (virtualGuest, serviceOffering, and hostedResource) contain one or more objects in the value component of the OperationParameter object.

POST /csm/serviceofferinginstance/onboard
Host: apiServer.calbro.com:8080
Authentication-Token: AQIC5wM2LY4Sfcx705TK5UqUK6Ythuk1tVWjHMl7/rpY0Ys=@REGUSER123091

{
  "timeout": -1, 
  "preCallout": "", 
  "postCallout": "", 
  "operationParams": [
    {
      "name": "virtualGuest", 
      "type": "com.bmc.cloud.model.beans.VirtualGuest", 
      "multiplicity": "1", 
      "value": {
        "cloudClass": "com.bmc.cloud.model.beans.VirtualGuest", 
        "externalID": "/id/SystemObject/Server/386f01df-d75e-4614-84d8-c4583c6982ef,/id/SystemObject/Server/0be2d9f5-253f-40e8-a082-8b5b9ae27da4", 
        "hostName": "W2k89", 
        "name": "W2k89", 
        "provider": "/provider/79e3a063-3c89-4c5a-ac84-f3551fde6139"
      }
    }, 
    {
      "name": "serviceOffering", 
      "type": "com.bmc.cloud.model.beans.ServiceOffering", 
      "multiplicity": "1", 
      "value": {
        "cloudClass": "com.bmc.cloud.model.beans.ServiceOffering", 
        "reconciliationID": "OI-92aa5c4975b04c4abfeda53c32fcaf04"
      }
    }, 
    {
      "name": "networkContainerID", 
      "type": "java.lang.String", 
      "multiplicity": "1", 
      "value": "3603f0e7-644f-4899-ad9e-c6a11f6dbcc8"
    }, 
    {
      "name": "tenant", 
      "type": "java.lang.String", 
      "multiplicity": "1", 
      "value": "Onboardcmpny"
    }, 
    {
      "name": "decommissionDate", 
      "type": "java.util.Date", 
      "multiplicity": "1", 
      "value": 1333144800000
    }, 
    {
      "name": "owner", 
      "type": "java.lang.String", 
      "multiplicity": "1", 
      "value": "onend"
    }, 
    {
      "name": "hostedResource", 
      "type": "com.bmc.cloud.model.beans.VirtualCluster", 
      "multiplicity": "1", 
      "value": {
        "cloudClass": "com.bmc.cloud.model.beans.VirtualCluster", 
        "guid": "172b6a13-e61d-4ad2-a7e3-c0877aed6cc9"
      }
    }
  ]
}
Was this page helpful? Yes No Submitting... Thank you

Comments