Download OpenAPI specification:
Webhook receiver for Grand Shooting events, publishing to gs-stream-api.
This service receives webhooks from Grand Shooting when pictures or references are created, updated, or deleted. Events are then published to the gs-stream-api for further processing by other services.
The webhook endpoint requires a per-client secret key passed as a query parameter (key).
Each client has its own unique webhookSecretKey that is automatically generated when the client is created.
The key can be regenerated at any time via the admin API.
The admin API requires an API key passed in the x-api-key header.
The following event types are supported:
pictures/create - Picture createdpictures/update - Picture updatedpictures/delete - Picture deletedreferences/create - Reference createdreferences/update - Reference updatedreferences/delete - Reference deletedReceive webhook events from Grand Shooting.
This endpoint is called by Grand Shooting when pictures or references are created, updated, or deleted. The service validates the payload, checks if the event type is enabled for the client, and publishes the event to gs-stream-api.
| accountId required | integer Grand Shooting account ID |
| key required | string Per-client secret key for authentication (obtain from admin API) |
| account_id required | integer Grand Shooting account ID | ||
| topic required | string Event topic (e.g., pictures/create) | ||
| type required | string Enum: "picture" "reference" Resource type | ||
required | Array of integers or strings List of affected resource IDs | ||
Array One of integer | |||
object Resource data keyed by ID | |||
| |||
| picture_id | Array of integers Deprecated Deprecated - use ids instead | ||
{- "account_id": 12345,
- "topic": "pictures/create",
- "type": "picture",
- "ids": [
- 1,
- 2,
- 3
], - "data": {
- "1": {
- "name": "photo1.jpg"
}, - "2": {
- "name": "photo2.jpg"
}, - "3": {
- "name": "photo3.jpg"
}
}
}{- "success": true,
- "processed": 0,
- "failed": 0
}Get a paginated list of all clients
| page | integer Default: 1 |
| limit | integer <= 100 Default: 20 |
{- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "accountId": 0,
- "accountName": "string",
- "webhookSecretKey": "string",
- "enabled": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "webhookConfigs": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "eventType": "pictures/create",
- "enabled": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}
], - "pagination": {
- "page": 0,
- "limit": 0,
- "total": 0,
- "totalPages": 0
}
}Create a new client.
When a client is created, webhook configurations for all event types are automatically created with enabled=true.
| accountId required | integer Grand Shooting account ID |
| accountName required | string Client name |
| enabled | boolean Default: true |
{- "accountId": 12345,
- "accountName": "Acme Corp",
- "enabled": true
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "accountId": 0,
- "accountName": "string",
- "webhookSecretKey": "string",
- "enabled": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "webhookConfigs": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "eventType": "pictures/create",
- "enabled": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "accountId": 0,
- "accountName": "string",
- "webhookSecretKey": "string",
- "enabled": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "webhookConfigs": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "eventType": "pictures/create",
- "enabled": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}Update a client's name or enabled status
| id required | string <uuid> |
| accountName | string |
| enabled | boolean |
{- "accountName": "Updated Name",
- "enabled": false
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "accountId": 0,
- "accountName": "string",
- "webhookSecretKey": "string",
- "enabled": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "webhookConfigs": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "eventType": "pictures/create",
- "enabled": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}Generate a new webhook secret key for a client.
The previous key will be invalidated immediately. Make sure to update the webhook URL in Grand Shooting with the new key after regeneration.
| id required | string <uuid> |
{- "webhookSecretKey": "string"
}Get all webhook configurations for a client
| id required | string <uuid> |
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "eventType": "pictures/create",
- "enabled": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]Update webhook configurations for a client (enable/disable specific event types)
| id required | string <uuid> |
required | Array of objects | ||||
Array
| |||||
{- "configs": [
- {
- "eventType": "pictures/create",
- "enabled": true
}, - {
- "eventType": "pictures/delete",
- "enabled": false
}
]
}[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "eventType": "pictures/create",
- "enabled": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]Get a paginated list of failed events with optional filtering
| page | integer Default: 1 |
| limit | integer <= 100 Default: 20 |
| accountId | integer Filter by account ID |
| eventType | string Enum: "pictures/create" "pictures/update" "pictures/delete" "references/create" "references/update" "references/delete" Filter by event type |
{- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "accountId": 0,
- "eventType": "string",
- "payload": { },
- "error": "string",
- "retryCount": 0,
- "nextRetry": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "client": {
- "accountName": "string"
}
}
], - "pagination": {
- "page": 0,
- "limit": 0,
- "total": 0,
- "totalPages": 0
}
}Manually trigger replay of failed events.
You can either:
all: true to replay all events that haven't reached max retries| ids | Array of strings <uuid> [ items <uuid > ] Specific event IDs to replay |
| all | boolean Replay all pending events |
{- "ids": [
- "550e8400-e29b-41d4-a716-446655440000"
]
}{- "replayed": 0,
- "failed": 0
}