No project description provided
Project description
SPIDA FORMS - Webhook & Form Manager
Overview
This project provides a Webhook & Form Manager for interacting with SPIDA Studio forms. The application allows users to:
- Manage Webhooks: Register and unregister webhooks for form updates.
- Edit Forms: Fetch and update SPIDA forms.
- View Webhook Events: Monitor real-time webhook event logs.
This document provides instructions on how to set up and use the system.
SPIDA Documentation
- SPIDA Webhook API Docs: SPIDA Webhook API
- Production SPIDA: techserv.spidastudio.com
- Test SPIDA: test-techserv.spidastudio.com
Form Templates
| Form Name | Template URL |
|---|---|
| Oncor Work Order Form (JUMR) | Edit Template 849 |
| Oncor JUFR Work Order Form | Edit Template 951317 |
Installation & Setup
Prerequisites
Ensure you have the following installed:
- Node.js (for local testing, if required)
- Python & Flask (for backend services)
Environment Variables (.env)
Create a .env file in the project root and add the following credentials:
# Admin user for both (Ask Keagan/Logan)
SPIDA_USERNAME=
SPIDA_PASSWORD=
# Oncor
SPIDA_COMPANY_ID=145
# PROD
# SPIDA_SERVER=techserv.spidastudio.com
# SPIDA_API_KEY=
# TEST
SPIDA_SERVER=test-techserv.spidastudio.com
SPIDA_API_KEY=
Running the Server
# Clone the repository
git clone https://github.com/TechServ-Consulting-Training-Ltd/spida_api
cd spida_api
# Install dependencies
pip install -r requirements.txt
# Start the Flask server
python server.py
Running the Web App
The frontend runs directly in the browser using Babel. To start:
# Ensure you are in the project root
python -m http.server 8000
Then, open http://localhost:8000 in your browser.
Features & Usage
1. Manage Webhooks
- View all registered webhooks.
- Register a new webhook by providing a URL, channel, and event regex.
- Unregister existing webhooks.
Example UI for Production:
Example Cloudwatch logs for Production:
To test webhook registrations:
- Navigate to the test SPIDA manager:
Test Project Manager
SPIDA UI:
- Modify a form and submit changes.
- View logs to verify webhook events.
2. Edit Forms
- Retrieve a form by entering its Form ID.
- Update form field values and submit changes.
- View API responses directly in the UI.
3. View Webhook Events
- Monitor incoming webhook events in real-time.
- Uses WebSockets for dynamic updates.
Using Ngrok for Webhook Debugging
To test webhooks locally, use ngrok to expose your local server.
ngrok http 5003
Then register https://your-ngrok-url/webhooks as a webhook URL in the SPIDA UI.
Example Webhook Payload
{
"channel": "Form",
"eventName": "update:TEST_02_14_2025:Oncor Work Order Form",
"hookId": "257b38c2-2d3b-4d14-b660-22feb8b2417a",
"payload": {
"form": {
"fields": {
"Email Subject Field": "Oncor Action Required: Need WR Approval in WMIS (WR Number shown below)",
"Oncor Work Order Name": "3334452",
"Oncor Work Order Number": "3334452"
},
"projectLevelRequiredFor": "PROJECT",
"template": "849",
"title": "Oncor Work Order Form"
},
"parentId": 15672587,
"parentName": "TEST_02_14_2025",
"projectId": 15672587,
"projectName": "TEST_02_14_2025",
"user": "kmcnew@techservltd.net"
},
"timestamp": 1739905831161
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spida_api-1.0.0.tar.gz.
File metadata
- Download URL: spida_api-1.0.0.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7695c6c1da4f51c2d233f5e897a5b3e2816ad8fbb22d6bc7f91c8fe0cf4a0d5f
|
|
| MD5 |
0b1415b0e5359b8ec1cc7bb688e8ee77
|
|
| BLAKE2b-256 |
45f3726d8cef4a1c53336453bf214cffa79ea987e07fe034ef6d35f95c4efb39
|
File details
Details for the file spida_api-1.0.0-py3-none-any.whl.
File metadata
- Download URL: spida_api-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ab89b712ad3618f9be0b41becf25bb63e365331234644e91d6eaeae82bf4b11
|
|
| MD5 |
830481ef094292986f419d7314e37d84
|
|
| BLAKE2b-256 |
85015d5c51e3b12628d6ddf2f424f98e10777979c7a9db7053850931986158ab
|