Unsupported content This version of the product has reached end of support. The documentation is available for your convenience. However, you must be logged in to access it. You will not be able to leave comments.

Action execute request


Description

Executes a proto-typical action.

API stability classification

Unassigned

API overview

HTTP
method

URI

Return
type

Return type
multiplicity

POST

csm/Action/guid/execute

void

Not applicable

HTTP request message

You must make the following REST calls in a sequence to form the Request body for this API:

  1. ReferenceActionCatalogEntry search API: Use the ReferenceActionCatalogEntry object from the ReferenceActionCatalogEntry search API response in this API.
  2. ComputeContainer search APIUse the {{code language="none"}}
    ComputeContainer
    {{/code}}
    object from the 
    ComputeContainer search API response in this API.

The following code snippet shows an Action execute request template. The code block in the Example section shows a real-world example.

Action-execute.gif

Query string parameters

This API does not use query string parameters.

Request message headers

This API uses only common headers listed in HTTP-request-and-response-headers.

Request message body

This API uses the following objects in the request message body JSON.

Top-level objects

Name

Type

Multi-
plicity

Description

callbackURL
String

0..1

URL to call when the operation finishes

postCallout
String

0..1

Identifier of a callout to run after the operation executes

preCallout
String

0..1

Identifier of a callout to run before the operation executes

timeout
Integer

0..1

Timeout setting. For more information about using the timeout, see Synchronous-and-asynchronous-operations. Timeout values:

  • 0: Immediate timeout
  • -1: Uses the system default timeout value
  • 1..*: Times out in the specified number of seconds
operationParams

1

Array of input parameters. The following table contains the list of input parameters. For information about setting up the input parameters, see Passing-input-parameters-with-an-API-request.

Input parameters to include in operationParams

Name

Type

Multi-
plicity

Description

nameValueMapEntries

0..*

 

HTTP response message

Response message headers

This API uses only common headers listed in HTTP-request-and-response-headers.

Response message body

The response message body contains a Task object.

Example

The following example shows an HTTP request that executes an action:

POST /csm/Action/guid/execute
Host: 10.1.113.28:9090
Authentication-token: AQIC5wM2LY4Sfcx705TK5UqUK6Ythuk1tVWjHMl7/rpY0Ys=@REGUSER431983

{
    "timeout": -1,
    "preCallout": "",
    "postCallout": "",
    "callbackURL": "",
    "operationParams": [{
        "name": "referenceActionCatalogEntry",
        "type": "com.bmc.cloud.model.beans.ReferenceActionCatalogEntry",
        "multiplicity": "1",
        "value": {
    "cloudClass" : "com.bmc.cloud.model.beans.ReferenceActionCatalogEntry",
    "actions" : [ "/action/2a992284-41f3-4bd2-a88e-4f24d99e38fd", "/action/ca92bc07-9ba7-45ee-bb0e-167bc863cf60",
"/action/5d617090-c41a-41aa-94db-4cf7491e6ae6" ],
    "guid" : "8f87632f-1e29-45ae-9a55-a3391fce3f58",
    "isDisabled" : false,
    "label" : "@action.catalogEntry.CustomServerOperatorAction.CSMTestProcess.CSM.Request.label@",
    "modifiedDate" : 1467626463000,
    "name" : "CSMTest:Process CSM Request",
    "reconciliationID" : "OI-2bd374adb5ec47a394ecbfecf55fa52d",
    "referenceActionCatalogEntryInputParams" : [ "/referenceactioncatalogentryinputparam/51795f11-af7c-42c6-8e5c-f929f58d943d",
"/referenceactioncatalogentryinputparam/48a3b9a5-9ab2-4113-bb07-a60680886ab6" ],
    "referenceActionCatalogEntryInputParamsObject" : [ {
      "cloudClass" : "com.bmc.cloud.model.beans.ReferenceActionCatalogEntryInputParam",
      "actionInputParams" : [ "/actioninputparam/9c63f892-f899-4df2-94cd-ce15ea1e8409", "/actioninputparam/1ef0e238-5fef-48ff-
9e68-039ef8c92215", "/actioninputparam/4eb9ccaa-f4cc-4b5a-bf3e-e54fb57021aa" ],
      "guid" : "51795f11-af7c-42c6-8e5c-f929f58d943d",
      "isEncrypted" : false,
      "isEndUserInputRequired" : false,
      "isOptional" : true,
      "label" : "@action.catalogEntry.CustomServerOperatorAction.CSMTestProcess.CSM.Request.additionalInfo.label@",
      "modifiedDate" : 1467626463000,
      "name" : "additionalInfo",
      "reconciliationID" : "OI-ab74d436ad5a4a41aed7fe248ba94e4e",
      "referenceActionCatalogEntry" : "/referenceactioncatalogentry/8f87632f-1e29-45ae-9a55-a3391fce3f58",
      "sequence" : 1,
      "tokenID" : "additionalInfo",
      "valueDataType" : "STRING"
    }, {
      "cloudClass" : "com.bmc.cloud.model.beans.ReferenceActionCatalogEntryInputParam",
      "actionInputParams" : [ "/actioninputparam/fa8df014-c2e6-4d8f-aa7d-5f1ccc452f9b", "/actioninputparam/e449b416-7970-413a-
ac8c-776343590d8e", "/actioninputparam/67d81383-958f-4f6e-b404-4134c084abb2" ],
      "guid" : "48a3b9a5-9ab2-4113-bb07-a60680886ab6",
      "isEncrypted" : false,
      "isEndUserInputRequired" : true,
      "isOptional" : true,
      "label" : "@action.catalogEntry.CustomServerOperatorAction.CSMTestProcess.CSM.Request.request.label@",
      "modifiedDate" : 1467626463000,
      "name" : "request",
      "reconciliationID" : "OI-5a5ee53eaf554cfe8de5eb8d362ba437",
      "referenceActionCatalogEntry" : "/referenceactioncatalogentry/8f87632f-1e29-45ae-9a55-a3391fce3f58",
      "sequence" : 2,
      "tokenID" : "request",
      "valueDataType" : "STRING"
    } ],
    "referenceActionCatalogGroup" : "/referenceactioncataloggroup/81fbf690-b346-4789-90a4-5085ffe5571f",
    "referenceActionCatalogGroupObject" : {
      "cloudClass" : "com.bmc.cloud.model.beans.ReferenceActionCatalogGroup",
      "actionGroups" : [ "/actiongroup/14946b8d-53de-4e4d-af67-6bfe8f0052cf", "/actiongroup/9a4ce070-9e2e-4f48-a3af-356f289db61c",
 "/actiongroup/53151dbf-2e6c-483d-961f-1cdbb59bb4af", "/actiongroup/dc1f7363-61e3-4546-980d-c10baecc1ce9", "/actiongroup/fb2f6963-
a5db-43a3-a1ae-5154d01d27fe", "/actiongroup/f1b85719-a584-4fce-acae-8be9c885256e", "/actiongroup/f02bb431-0971-440f-8e00-
daa6b06289cd", "/actiongroup/a275e6a0-37ca-4413-aa90-409761201f36", "/actiongroup/8e3d99ad-f05e-4b21-816c-030b5a0c1f0b",
"/actiongroup/c5e098a3-255d-4b3d-a21a-0a1cbf48e5da", "/actiongroup/42319f9d-41f3-4738-a706-b2182ec5daa6", "/actiongroup/
05767ee7-ba47-4271-9f1b-594927639865", "/actiongroup/9b3e2651-ddf4-47e8-99af-29a4f13fc15d", "/actiongroup/3ebc00d7-35ed-4a1c-
b68b-9fe2ee23d6b4", "/actiongroup/650ee1f3-246b-406b-8195-754c6900254f", "/actiongroup/6a29f6e5-232d-463f-be51-890d97fa6873",
"/actiongroup/f883ead4-07ef-486b-9bc8-0d444d690f75", "/actiongroup/e2df256c-c89c-407f-b784-2094e4850371",
"/actiongroup/dee31b58-a416-49c3-a195-62c0ddb17e09", "/actiongroup/b64f77a7-60d6-494a-9706-df7cb38201bc",
"/actiongroup/2f14760c-2d8f-484b-b65a-1a9edfb469be", "/actiongroup/f2092504-abcb-4097-a7d2-94625eb46eb1" ],
      "applicableCloudClass" : "ComputeContainer",
      "description" : "@action.catalogEntry.CustomServerOperatorAction.description@",
      "guid" : "81fbf690-b346-4789-90a4-5085ffe5571f",
      "label" : "@action.catalogEntry.CustomServerOperatorAction.label@",
      "modifiedDate" : 1467626463000,
      "name" : "CustomServerOperatorAction",
      "reconciliationID" : "OI-f5170a0fcb3e46f1b3660a69344f908f",
      "referenceActionCatalog" : "/referenceactioncatalog/6ce9f9ef-5211-4390-a19f-4dbbaf83245f",
      "referenceActionCatalogEntries" : [ "/referenceactioncatalogentry/8f87632f-1e29-45ae-9a55-a3391fce3f58" ],
      "resourceActionCatalogGroups" : [ "/actioncataloggroup/c6ecc9df-e883-44ef-82c9-bd2f5f086cff" ],
      "tokenID" : "CustomServerOperatorAction"
    },
    "resourceActionCatalogEntries" : [ "/actioncatalogentry/49930918-909a-43ee-a591-d985e1532f9c" ],
    "tokenID" : "CSMTest:Process CSM Request"
  }
    }, {
        "name": "cloudObject",
        "type": "com.bmc.cloud.model.beans.ComputeContainer",
        "multiplicity": "1",
        "value": {
    "cloudClass" : "com.bmc.cloud.model.beans.ComputeContainer",
    "computeContainerNetworkInterface" : [ "/computecontainernetworkinterface/5db8a085-909d-445f-8143-ff9e9d4bab87",
"/computecontainernetworkinterface/1c0caafa-e3fe-408e-8083-9568f6446ab3" ],
    "cpus" : 2,
    "description" : " ",
    "guid" : "fa5e45d4-fe67-4acd-b4dc-34cec3557ab4",
    "hwArchitecture" : "X86",
    "isVirtual" : true,
    "localDisks" : [ "/localdisk/e4d2cf1b-fce8-44b0-b9e2-13a1dbadf03d" ],
    "logicalHostingEnvironmentID" : "3b98232e-8856-4e68-be4c-59a56716fc88",
    "modificationDate" : 1469095058000,
    "modifiedDate" : 1469095058000,
    "name" : "agraw-5",
    "nics" : [ "/servernetworkinterface/7b1dcc58-574f-413a-b9f7-9843d31d27cd", "/servernetworkinterface/
2d1542d2-a617-4a9d-b6a6-561c3332393e" ],
    "operatingSystem" : "/operatingsystem/49d6e532-0dad-4ad5-9cc8-01f557c915fa",
    "owner" : "AltoCloudUser1",
    "provider" : "/provider/97ab63b7-d042-451f-a48e-9374eb8c5eba",
    "provisionDate" : 1469094078000,
    "reconciliationID" : "OI-a5462b0ec9e747dcb7c6f3f9c505a0af",
    "resourceSet" : "/resourceset/3c96488d-81a8-495a-afd9-aeb51ae776ba",
    "server" : "/virtualguest/1e98b7db-0c43-4525-a57c-c833bdcaacac",
    "serviceOfferingInstanceID" : "d0b76a3e-536f-4943-9a2e-014585f4c78d",
    "software" : [ ],
    "state" : "Running",
    "storageConnection" : [ ],
    "systemType" : "VMWare",
    "tenant" : "/organization/AGHAA5V0HC3F9AOBLPPYB3O6QBBKH2",
    "tokenID" : "agraw-5",
    "totalMemory" : 2048
  }
    }, {
        "name": "nameValueMapEntries",
        "type": "com.bmc.cloud.model.beans.NameValueMapEntry",
        "multiplicity": "*",
        "value": [{
            "cloudClass": "com.bmc.cloud.model.beans.NameValueMapEntry",
            "guid": "7add0911-4132-4439-995a-e3fed0242ffb",
            "name": "input",
            "primitiveValue": ["clmmosh"],
            "type": "STRING"
        }]
    }]

 

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*