| Required role: | TenantReader |
| POST | /api/action-assignments | Assigns an action to a config item | |
|---|---|---|---|
| POST | /action-assignments | Assigns an action to a config item |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| TenantName | header | string | Yes | |
| ConfigItemId | path | string | Yes | The unique id of the config item |
| ConfigItemType | body | ObjectTypes | Yes | The type of the config item (either Deployment, ResourceGroup or Resource)Allowable Values
|
| ActionId | path | string | Yes | |
| Name | body | string | Yes | A unique name for the action |
| Parameters | body | array | Yes | |
| CronExpression | body | string | No | The cron expression for scheduling the operation |
| SendNotifications | body | bool | No | Inform users when the job has finished |
| None | |
| ConfigItem | |
| Tenant | |
| Collection | |
| Resource | |
| ComputeNode | |
| VirtualMachine | |
| PhysicalMachine | |
| Disk | |
| Subnet | |
| IPAddress | |
| Job | |
| JobEvent | |
| FreezePeriod | |
| ResourceGroup | |
| Deployment | |
| ResourceGroupTemplate | |
| DeploymentTemplate | |
| ResourceProvider | |
| GenericResource | |
| Role | |
| Permission | |
| User | |
| PatchingWindow | |
| Update | |
| ReportDefinition | |
| TimeSeries | |
| DataPoint | |
| Action | |
| ActionAssignment | |
| UserNote |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Name | form | string | Yes | |
| Description | form | string | No | |
| Value | form | string | No | Value in form of a json string (e.g. Number = 1234, String = "foo", Boolean = false). Note: string values need extra quotes |
| Default | form | string | No | Optional default value for the frontend. Needs to be in the same format as the value |
| Optional | form | bool | No | Optional parameters do not need to have a value. Default -> Optional=false |
| Type | form | ParameterValueType | No | The data type of the value and default property |
| Validation | form | string | No |
| String | |
| Number | |
| Boolean | |
| SecureString |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid | No | |
| Name | form | string | Yes | |
| ActionId | form | Guid | No | |
| Action | form | ActionDto | No | |
| ConfigItemId | form | Guid | No | |
| ConfigItemName | form | string | Yes | |
| ConfigItemType | form | ObjectTypes | No | |
| Parameters | form | List<ParameterDto> | Yes | |
| SelfLink | form | string | Yes | |
| Scope | form | ActionScopes | No | |
| CronExpression | form | string | No | |
| Links | form | IList<LinkDto> | Yes | |
| ScheduledTaskAssignmentId | form | Guid? | No | |
| ScheduledTaskAssignment | form | ScheduledTaskAssignmentDto | No | |
| ObjectType | form | ObjectTypes | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| TenantId | form | Guid | No | |
| SchemaVersion | form | int | No | The schema version of the attached definition (json/yaml structure) |
| Definition | form | string | No | The action definition as json/yaml |
| Parameters | form | IList<ParameterDto> | Yes | Action parameters |
| IsDisabled | form | bool | No | Disabled actions cannot be assigned to a configitem |
| Scope | form | ActionScopes | No | This action can anly be assigned to configitems of this type |
| Steps | form | List<ActionStepDto> | Yes | The individual steps of the action |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid | No | |
| Name | form | string | Yes | |
| DisplayName | form | string | Yes | |
| Description | form | string | No | |
| ObjectType | form | ObjectTypes | No | |
| SelfLink | form | string | Yes | |
| Tags | form | IList<TagDto> | Yes | |
| Path | form | IList<PathItemDto> | Yes | |
| Created | form | DateTime | No | |
| CreateUser | form | string | Yes | |
| CreateUserId | form | string | Yes | |
| Modified | form | DateTime | No | |
| ModifyUser | form | string | Yes | |
| ModifyUserId | form | string | Yes | |
| IsDeleted | form | bool | No | |
| Deleted | form | DateTime? | No | |
| DeleteUser | form | string | No | |
| DeleteUserId | form | string | No | |
| Links | form | IList<LinkDto> | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Name | form | string | Yes | |
| Value | form | string | No | |
| IsProtected | form | bool | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Label | form | string | Yes | |
| Link | form | string | Yes | |
| ObjectType | form | ObjectTypes | No | |
| ObjectId | form | Guid | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Caption | form | string | Yes | |
| Rel | form | string | Yes | |
| HRef | form | string | Yes | |
| Method | form | string | Yes |
| Deployment | |
| ResourceGroup | |
| Resource |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Name | form | string | Yes | |
| DisplayName | form | string | No | |
| Variables | form | Dictionary<string, Object> | Yes | The variables which are used in the ansible job |
| Credential | form | string | No | Optional credential to be used in awx (credential stored in awx) |
| Limit | form | string | No | Ansible limit (optional if Scope is Resource) |
| Type | form | string | No | Optional type of the awx action to run (job, workflow, etc.) |
| Module | form | string | No | Optional ansible module to be used |
| ExecutionEnvironment | form | string | No | Optional image for the execution environment which runs the action |
| Inventory | form | string | No | Optional inventory |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid | No | |
| ConfigItemId | form | Guid | No | |
| ObjectType | form | ObjectTypes | No | |
| DisplayName | form | string | Yes | |
| TaskId | form | long | No | |
| TaskName | form | string | Yes | |
| CronExpression | form | string | Yes |
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/action-assignments HTTP/1.1
Host: core.starburst.svc
Accept: application/json
Content-Type: application/json
Content-Length: length
{"tenantName":"String","configItemId":"00000000-0000-0000-0000-000000000000","configItemType":"None","actionId":"00000000-0000-0000-0000-000000000000","name":"String","parameters":[{"name":"String","description":"String","value":"String","default":"String","optional":false,"type":"String","validation":"String"}],"cronExpression":"String","sendNotifications":false,"txId":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"id":"00000000-0000-0000-0000-000000000000","name":"String","actionId":"00000000-0000-0000-0000-000000000000","action":{"tenantId":"00000000-0000-0000-0000-000000000000","schemaVersion":0,"definition":"String","parameters":null,"isDisabled":false,"scope":"Deployment","steps":[{"name":"String","displayName":"String","variables":{"String":{}},"credential":"String","limit":"String","type":"String","module":"String","executionEnvironment":"String","inventory":"String"}],"id":"00000000-0000-0000-0000-000000000000","name":"String","displayName":"String","description":"String","objectType":"None","selfLink":"String","tags":null,"path":null,"created":"0001-01-01T00:00:00.0000000Z","createUser":"String","createUserId":"String","modified":"0001-01-01T00:00:00.0000000Z","modifyUser":"String","modifyUserId":"String","isDeleted":false,"deleted":"0001-01-01T00:00:00.0000000Z","deleteUser":"String","deleteUserId":"String","links":null},"configItemId":"00000000-0000-0000-0000-000000000000","configItemName":"String","configItemType":"None","parameters":[{"name":"String","description":"String","value":"String","default":"String","optional":false,"type":"String","validation":"String"}],"selfLink":"String","scope":"Deployment","cronExpression":"String","links":[{"caption":"Start","rel":"start","hRef":"/action-assignments/00000000-0000-0000-0000-000000000000/start","method":"POST"},{"caption":"Completed","rel":"completed","hRef":"/action-assignments/00000000-0000-0000-0000-000000000000/completed","method":"PATCH"}],"scheduledTaskAssignmentId":"00000000-0000-0000-0000-000000000000","scheduledTaskAssignment":{"id":"00000000-0000-0000-0000-000000000000","configItemId":"00000000-0000-0000-0000-000000000000","objectType":"None","displayName":"String","taskId":0,"taskName":"String","cronExpression":"String"},"objectType":"ActionAssignment"}