ServiceNow Incident Data Export to Excel (via REST API)
Description: This Python project connects to the ServiceNow REST API to retrieve incident records and export them into an Excel file using pandas. It demonstrates how to securely access, process, and export data from a ServiceNow instance.
🚀 What This Project Does:
-
- Connects to the ServiceNow Incident Table using the REST API.
- Authenticates with basic credentials.
- Sends a GET request with custom query filters.
- Parses the JSON response into a pandas DataFrame.
- Extracts relevant fields (e.g., incident_number, state, sys_updated_on).
- Exports the data to an .xlsx file.
- Handles pagination to retrieve more than 100 records if needed.
🛠 Tools & Technologies Used:
-
🔗 ServiceNow REST API – For accessing incident data.
📡 REST API Explorer – For building and testing the endpoint.
🐍 Python 3 – Core scripting language.
📦 requests, pandas – requests for API communication/pandas for data manipulation/export.
💻 Visual Studio Code – IDE for development.
📁 Output: .xlsx file containing incident records.
📂 Directory Structure (Example)
