Create Runbook
Create Runbook
| API | createrunbook |
|---|---|
| Purpose: | To create runbook |
| API URL: | http://<API URL>:<API Port>/v2/createrunbook/orgentityid/{orgentityid} |
| Basic / Token: | Post |
| Method Type: | Post |
Request Format:
|
|
Parameters Required for Request Body
| Column | Column Type | Mandatory | Expected/Sample Value | Remarks |
|---|---|---|---|---|
| RunbookUniqueName | String | Yes | TestRunbook | This field contains unique Runbook Name |
| UserFriendlyName | String | No | testing | This field contains user friendly runbook name |
| Description | String | Yes | Test Desc | This field contains description about the runbook |
| RunbookPath | String | Yes | /var/lib/awx/projects/GenAI_playbooks | This field contains path where runbook execution template stores |
| StatusUpdateFrequencyInterval | String | No | SS, MM or HH | This field contains interval of status update frequency |
| StatusUpdateFrequency | Integer | No | 10 | This field contains frequency of status update |
| Category | String | Yes | testing | This field contains category |
| SubCategory | String | No | testing | This field contains sub category |
| CategoryGranularDetails | String | Yes | testing | This field contains category granular details |
| RunbookCategory | String | No | testing | This fields contains runbook category |
| RunbookAction | String | Yes | testing | This fields contains runbook action |
| Tags | String | Yes | Execute, Run | This fields contains runbook tags |
| EnableAutoExecution | bool | No | True, false | You can use it for enable or disable auto execution |
| RunbookFriendlyDescription | String | No | Test Desc | This fields contains runbopok friendly description |
| ResponseFilePath | String | No | File path | This field contains runbook response path |
| MaximumAttemptCount | String | No | 5 | This fields defins maximum how many time you can attempt |
| RecommendationDescription | String | No | Test Desc | This fields contains the recommendation description |
| StatusUpdateRetryAttempt | Integer | No | 5 | This fields defins maximum how many time try for status update |
| RunbookToolOrgName | String | Yes | Default | This fields contains Runbook tool organization name. |
| RunbookToolId | Integer | Yes | 3 | This fields contains the tool id for which tool we are creating runbook |
| RBAToolRole | String | Yes | Role Name | This fields contains the Role name, its value comes from Template response |
| runbookDetailsParameter : Name | String | Yes | Name | This fields contains the parameter name |
| runbookDetailsParameter : Label | String | Yes | Label | This fields contains parameter label |
| runbookDetailsParameter : Desc | String | Yes | Testing | This fields contains the description of parameter |
| runbookDetailsParameter : DefaultValue | String | No | Testing | This fields contains the default of parameter |
| runbookDetailsParameter : FieldTypeId | String | Yes | TEXT/SECUREPARAMETER | This fields contains the field type |
| runbookDetailsParameter : IsRequired | Boolean | Yes | True/ False | You can use it for parameter is required or not |
| runbookDetailsParameter : ParameterTypeId | Integer | Yes | 7 | This fields contains the parameter type id |
| runbookDetailsParameter : IsCIBasedParameter | Boolean | No | True/ False | You can use it for parameter is CI Based parameter or not |
| runbookDetailsParameter : IsReadOnlyParameter | Boolean | No | True/ False | You can use it for parameter is Read only parameter or not |
Output: |
||||
Parameters Returned from Response of API
| Column | Column Type | Value | Remarks |
|---|---|---|---|
| RunbookId | string | 6932 | This field provide unique runbook id |
| RunbookName | string | My_Job_Template_20240607121533 | This fields provide unique runbook name |
| Status | string | Success/Fail | This field provide status |
| Message | string | Change Request saved successfully | Success /fail message |