.. servicenow.itsm.change_request_info_module: change_request_info -- List ServiceNow change requests ====================================================== Retrieve information about ServiceNow change requests. For more information, refer to the ServiceNow change management documentation at https://docs.servicenow.com/bundle/paris-it-service-management/page/product/change-management/concept/c_ITILChangeManagement.html. .. versionadded:: 1.0.0 Examples -------- .. code-block:: yaml+jinja - name: Retrieve all change requests servicenow.itsm.change_request_info: register: result - name: Retrieve a specific change request by its sys_id servicenow.itsm.change_request_info: sys_id: 471bfbc7a9fe198101e77a3e10e5d47f register: result - name: Retrieve change requests by number servicenow.itsm.change_request_info: number: PRB0007601 register: result - name: Retrieve change requests that contain SAP in its short description servicenow.itsm.change_request_info: query: - short_description: LIKE SAP register: result - name: Retrieve new change requests assigned to abel.tuter or bertie.luby servicenow.itsm.change_request_info: query: - state: = new assigned_to: = abel.tuter - state: = new assigned_to: = bertie.luby See Also -------- .. seealso:: - :ref:`modules/servicenow.itsm.change_request_module` Parameters ---------- change_request_mapping (optional) User mapping for *Change request* object, where user can override Choice Lists values for objects. | **type**: dict impact (optional) Impact is a measure of the effect of an incident, problem, or change on business processes. | **type**: dict priority (optional) Priority is based on impact and urgency, and it identifies how quickly the service desk should address the task. | **type**: dict risk (optional) The risk level for the change. | **type**: dict state (optional) The state of the change request. If *state* value is ``assess`` or ``authorize`` or ``scheduled`` or ``implement`` or ``review`` or ``closed``, *assignment_group* parameter must be filled in. In case that any field is renamed, that check is not performed there. For more information on state model and transition, refer to the ServiceNow documentation at https://docs.servicenow.com/bundle/paris-it-service-management/page/product/change-management/concept/c_ChangeStateModel.html Special value that can not be overridden is ``absent``, which would remove a change request from ServiceNow. | **type**: dict urgency (optional) The extent to which resolution of an change request can bear delay. | **type**: dict instance (optional) ServiceNow instance information. | **type**: dict client_id (optional) ID of the client application used for OAuth authentication. If not set, the value of the ``SN_CLIENT_ID`` environment variable will be used. If provided, it requires *client_secret*. | **type**: str client_secret (optional) Secret associated with *client_id*. Used for OAuth authentication. If not set, the value of the ``SN_CLIENT_SECRET`` environment variable will be used. If provided, it requires *client_id*. | **type**: str grant_type (optional) Grant type used for OAuth authentication. If not set, the value of the ``SN_GRANT_TYPE`` environment variable will be used. | **type**: str | **default**: password | **choices**: password, refresh_token host (required) The ServiceNow host name. If not set, the value of the ``SN_HOST`` environment variable will be used. | **type**: str password (optional) Password used for authentication. If not set, the value of the ``SN_PASSWORD`` environment variable will be used. Required when using basic authentication or when *grant_type=password*. | **type**: str refresh_token (optional) Refresh token used for OAuth authentication. If not set, the value of the ``SN_REFRESH_TOKEN`` environment variable will be used. Required when *grant_type=refresh_token*. | **type**: str timeout (optional) Timeout in seconds for the connection with the ServiceNow instance. If not set, the value of the ``SN_TIMEOUT`` environment variable will be used. | **type**: float username (optional) Username used for authentication. If not set, the value of the ``SN_USERNAME`` environment variable will be used. Required when using basic authentication or when *grant_type=password*. | **type**: str number (optional) Number of the record to retrieve. Note that contrary to *sys_id*, *number* may not uniquely identify a record. | **type**: str query (optional) Provides a set of operators for use with filters, condition builders, and encoded queries. The data type of a field determines what operators are available for it. Refer to the ServiceNow Available Filters Queries documentation at https://docs.servicenow.com/bundle/quebec-platform-user-interface/page/use/common-ui-elements/reference/r_OpAvailableFiltersQueries.html. | **type**: list sys_id (optional) Unique identifier of the record to retrieve. | **type**: str Return Values ------------- records A list of change request records. **sample**: .. code-block:: yaml - active: 'false' activity_due: '' additional_assignee_list: '' approval: approved approval_history: '' approval_set: '' assigned_to: '' assignment_group: d625dccec0a8016700a222a0f7900d06 attachments: - average_image_color: '' chunk_size_bytes: '700000' compressed: 'true' content_type: text/plain download_link: https://www.example.com/api/now/attachment/5f7d3c950706301022f9ffa08c1ed062/file file_name: sample_file1.txt hash: 6f2b0dec698566114435a23f15dcac848a40e1fd3e0eda4afe24a663dda23f2e image_height: '' image_width: '' size_bytes: '210' size_compressed: '206' state: pending sys_created_by: admin sys_created_on: '2021-08-17 11:18:33' sys_id: 5f7d3c950706301022f9ffa08c1ed062 sys_mod_count: '0' sys_tags: '' sys_updated_by: admin sys_updated_on: '2021-08-17 11:18:33' table_name: change_request table_sys_id: 3a7db0d50706301022f9ffa08c1ed092 backout_plan: '' business_duration: '' business_service: '' cab_date: '' cab_delegate: '' cab_recommendation: '' cab_required: 'false' calendar_duration: '' category: Other change_plan: '' close_code: successful close_notes: Completed successfully closed_at: '2015-07-06 18:18:53' closed_by: 6816f79cc0a8016401c5a33be04be441 cmdb_ci: '' comments: '' comments_and_work_notes: '' company: '' conflict_last_run: '' conflict_status: Not Run contact_type: phone contract: '' correlation_display: '' correlation_id: '' delivery_plan: '' delivery_task: '' description: Decommission a server due_date: '' end_date: '' escalation: '0' expected_start: '' follow_up: '' group_list: '' impact: '3' implementation_plan: Implementation plan justification: '' knowledge: 'false' location: '' made_sla: 'true' number: CHG0000023 on_hold: 'false' on_hold_reason: '' on_hold_task: '' opened_at: '2015-07-06 18:17:21' opened_by: 6816f79cc0a8016401c5a33be04be441 order: '' outside_maintenance_schedule: 'false' parent: '' phase: requested phase_state: open priority: '4' production_system: 'false' reason: '' reassignment_count: '2' requested_by: 6816f79cc0a8016401c5a33be04be441 requested_by_date: '' review_comments: '' review_date: '' review_status: '' risk: '3' risk_impact_analysis: '' route_reason: '' scope: '3' service_offering: '' short_description: Decommission server sla_due: '' start_date: '' state: '3' std_change_producer_version: deb8544047810200e90d87e8dee490af sys_class_name: change_request sys_created_by: admin sys_created_on: '2015-07-06 18:17:22' sys_domain: global sys_domain_path: / sys_id: 70ad699e47410200e90d87e8dee4907d sys_mod_count: '8' sys_tags: '' sys_updated_by: admin sys_updated_on: '2015-07-06 18:18:53' task_effective_number: CHG0000023 test_plan: Test plan time_worked: '' type: standard unauthorized: 'false' universal_request: '' upon_approval: proceed upon_reject: cancel urgency: '3' user_input: '' watch_list: '' work_end: '2015-07-06 18:18:34' work_notes: '' work_notes_list: '' work_start: '2015-07-06 18:17:41'