Download OpenAPI specification:Download
| Environment Variable | Type | Required | Default Value | Description |
|---|---|---|---|---|
| API_SERVER_PORT | int | 3615 | Port the server will listen on. | |
| API_SERVER_READ_TIMEOUT | time.Duration | 5s | Maximum duration for reading requests. | |
| API_SERVER_WRITE_TIMEOUT | time.Duration | 10s | Maximum duration for writing responses. | |
| DB_URI | string | localhost:5432 | SQL server URI. | |
| DB_AUTH_USER | string | postgres | SQL authentication username. | |
| DB_AUTH_PASS | string | "" | SQL authentication password. | |
| DB_DATABASE | string | notificationmanagement | SQL database to connect to. | |
| DB_ENCRYPTION_SECRET | string | ✓ | Secret used to encrypt some sensitive data before storing in database. Must be 32 characters in length. | |
| DEBUG | string | false | Enables debug routes if set to true. |
|
| ENV | string | development | Environment the application runs in. | |
| KAFKA_BROKERS | string | localhost:9092 | Kafka brokers URI. Multiple addresses can be specified using , as delimiter. |
|
| KAFKA_CONSUMER_FETCH_BYTES | int | 1048576 | Best-effort number of bytes needed before fetching from Kafka. | |
| KAFKA_CONSUMER_FETCH_FREQUENCY | time.Duration | 250ms | Best-effort frequency of fetches from Kafka. | |
| KAFKA_TOPIC_PREFIX | string | "" | Prefix to prepend to Kafka topics. | |
| KAFKA_TOPIC_REPLICATION_FACTOR | int | 1 | Number of copies of a topic's partitions across the cluster. | |
| OPS_SERVER_PORT | int | 3616 | Port the server will listen on. | |
| OPS_SERVER_READ_TIMEOUT | time.Duration | 5s | Maximum duration for reading requests. | |
| OPS_SERVER_WRITE_TIMEOUT | time.Duration | 10s | Maximum duration for writing responses. | |
| POD_IP | string | 127.0.0.1 | IP address of the instance. This value is set in a Kubernetes manifest. | |
| POD_NAME | string | localhost | Hostname of the instance. This value is set in a Kubernetes manifest. | |
| PROJECT_MANAGEMENT_API_URI | string | http://localhost:8101/api | URI for the Project Management API. | |
| TZ | string | America/Montreal | The timezone used by the application when working with dates. | |
| WEBHOOKS_MAX_RETRIES | int | 3 | Maximum number of retries for a webhook. | |
| WEBHOOKS_RETRY_INTERVAL | time.Duration | 1s | Interval between retries. | |
| WEBHOOKS_WRITE_TIMEOUT | time.Duration | 10s | Maximum duration for writing responses. | |
| WEBHOOKS_PUBLIC_VERIFICATION_KEY_SIGNATURE_HEADER | string | X-3dverse-Signature | HTTP header where the signature is stored. | |
| WEBHOOKS_PUBLIC_VERIFICATION_KEY_SIGNATURE_TIMESTAMP_HEADER | string | X-3dverse-Signature-Timestamp | HTTP header where the signature timestamp is stored. |
Running the below command will start the API server:
go run ./main.go
Building binaries is made using the make.go file for convenience as for example ldflags are used to set certain variables.
Other commands are available as defined below:
$ go run make.go
Tool that replaces Makefile for cross-platform development.
Usage:
go run make.go <command> [options]
The commands are:
build compile packages and dependencies
build-all compile packages and dependencies for most platforms
clean remove build and test artifacts
coverage test packages and generate test coverage report
coverage-html test packages and generate test coverage report in HTML format
generate generate code
init initialize project such as setting up Git hooks
test test packages
Build binary for the current OS & architecture:
go run make.go build
Build multiple binaries for different OSes & architectures:
go run make.go build-all
Clean build directory:
go run make.go clean
This project is licensed under a proprietary license - see the LICENSE file for details.
List all webhooks for a specific environment.
| environment_id required | string <uuid> (Ext_EnvironmentId) Target environment ID. |
[- {
- "name": "string",
- "url": "string",
- "method": "get",
- "events": [
- "pipeline-created"
], - "webhook_id": "a47606a1-5b39-4a81-9480-c2cb738ff675",
- "environment_id": "40ef0e48-a11f-4963-a229-e396c9f7e7c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "description": "string",
- "disabled_until": "2019-08-24T14:15:22Z",
- "custom_headers": {
- "property1": "string",
- "property2": "string"
}, - "last_triggered": {
- "log_id": "14b5977f-7a80-40ca-bb79-eca6c2abdb34",
- "webhook_id": "a47606a1-5b39-4a81-9480-c2cb738ff675",
- "created_at": "2019-08-24T14:15:22Z",
- "duration_in_ms": 0,
- "status_code": 0,
- "response_body": "string"
}, - "last_errored": {
- "log_id": "14b5977f-7a80-40ca-bb79-eca6c2abdb34",
- "webhook_id": "a47606a1-5b39-4a81-9480-c2cb738ff675",
- "created_at": "2019-08-24T14:15:22Z",
- "duration_in_ms": 0,
- "status_code": 0,
- "response_body": "string"
}
}
]Create a new webhook for a specific environment.
| environment_id required | string <uuid> (Ext_EnvironmentId) Target environment ID. |
Webhook properties.
| name required | string Name of the webhook. |
| url required | string URL of the webhook. |
| method | string (HTTPMethod) Default: "post" Enum: "get" "post" "put" "patch" "delete" HTTP method to be used for the webhook. |
| events required | Array of strings (Event Type) non-empty Items Enum: "pipeline-created" "pipeline-download-progress" "pipeline-extraction-progress" "pipeline-status-changed" "pipeline-completed" "job-created" "job-status-changed" "job-completed" List of events that trigger the webhook. |
| description | string Description of the webhook. |
| disabled_until | string <date-time> Date and time until the webhook is disabled. |
object [ 1 .. 10 ] properties Custom headers to be sent with the webhook. |
{- "name": "string",
- "url": "string",
- "method": "get",
- "events": [
- "pipeline-created"
], - "description": "string",
- "disabled_until": "2019-08-24T14:15:22Z",
- "custom_headers": {
- "property1": "string",
- "property2": "string"
}
}{- "name": "string",
- "url": "string",
- "method": "get",
- "events": [
- "pipeline-created"
], - "webhook_id": "a47606a1-5b39-4a81-9480-c2cb738ff675",
- "environment_id": "40ef0e48-a11f-4963-a229-e396c9f7e7c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "description": "string",
- "disabled_until": "2019-08-24T14:15:22Z",
- "custom_headers": {
- "property1": "string",
- "property2": "string"
}, - "last_triggered": {
- "log_id": "14b5977f-7a80-40ca-bb79-eca6c2abdb34",
- "webhook_id": "a47606a1-5b39-4a81-9480-c2cb738ff675",
- "created_at": "2019-08-24T14:15:22Z",
- "duration_in_ms": 0,
- "status_code": 0,
- "response_body": "string"
}, - "last_errored": {
- "log_id": "14b5977f-7a80-40ca-bb79-eca6c2abdb34",
- "webhook_id": "a47606a1-5b39-4a81-9480-c2cb738ff675",
- "created_at": "2019-08-24T14:15:22Z",
- "duration_in_ms": 0,
- "status_code": 0,
- "response_body": "string"
}
}Get a specific webhook by its ID.
| webhook_id required | string <uuid> (Webhook ID) Target webhook ID. |
{- "name": "string",
- "url": "string",
- "method": "get",
- "events": [
- "pipeline-created"
], - "webhook_id": "a47606a1-5b39-4a81-9480-c2cb738ff675",
- "environment_id": "40ef0e48-a11f-4963-a229-e396c9f7e7c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "description": "string",
- "disabled_until": "2019-08-24T14:15:22Z",
- "custom_headers": {
- "property1": "string",
- "property2": "string"
}, - "last_triggered": {
- "log_id": "14b5977f-7a80-40ca-bb79-eca6c2abdb34",
- "webhook_id": "a47606a1-5b39-4a81-9480-c2cb738ff675",
- "created_at": "2019-08-24T14:15:22Z",
- "duration_in_ms": 0,
- "status_code": 0,
- "response_body": "string"
}, - "last_errored": {
- "log_id": "14b5977f-7a80-40ca-bb79-eca6c2abdb34",
- "webhook_id": "a47606a1-5b39-4a81-9480-c2cb738ff675",
- "created_at": "2019-08-24T14:15:22Z",
- "duration_in_ms": 0,
- "status_code": 0,
- "response_body": "string"
}
}Update a specific webhook by its ID.
| webhook_id required | string <uuid> (Webhook ID) Target webhook ID. |
Webhook properties.
| name required | string Name of the webhook. |
| url required | string URL of the webhook. |
| method | string (HTTPMethod) Default: "post" Enum: "get" "post" "put" "patch" "delete" HTTP method to be used for the webhook. |
| events required | Array of strings (Event Type) non-empty Items Enum: "pipeline-created" "pipeline-download-progress" "pipeline-extraction-progress" "pipeline-status-changed" "pipeline-completed" "job-created" "job-status-changed" "job-completed" List of events that trigger the webhook. |
| description | string Description of the webhook. |
| disabled_until | string <date-time> Date and time until the webhook is disabled. |
object [ 1 .. 10 ] properties Custom headers to be sent with the webhook. |
{- "name": "string",
- "url": "string",
- "method": "get",
- "events": [
- "pipeline-created"
], - "description": "string",
- "disabled_until": "2019-08-24T14:15:22Z",
- "custom_headers": {
- "property1": "string",
- "property2": "string"
}
}{- "name": "string",
- "url": "string",
- "method": "get",
- "events": [
- "pipeline-created"
], - "webhook_id": "a47606a1-5b39-4a81-9480-c2cb738ff675",
- "environment_id": "40ef0e48-a11f-4963-a229-e396c9f7e7c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "description": "string",
- "disabled_until": "2019-08-24T14:15:22Z",
- "custom_headers": {
- "property1": "string",
- "property2": "string"
}, - "last_triggered": {
- "log_id": "14b5977f-7a80-40ca-bb79-eca6c2abdb34",
- "webhook_id": "a47606a1-5b39-4a81-9480-c2cb738ff675",
- "created_at": "2019-08-24T14:15:22Z",
- "duration_in_ms": 0,
- "status_code": 0,
- "response_body": "string"
}, - "last_errored": {
- "log_id": "14b5977f-7a80-40ca-bb79-eca6c2abdb34",
- "webhook_id": "a47606a1-5b39-4a81-9480-c2cb738ff675",
- "created_at": "2019-08-24T14:15:22Z",
- "duration_in_ms": 0,
- "status_code": 0,
- "response_body": "string"
}
}Delete a specific webhook by its ID.
| webhook_id required | string <uuid> (Webhook ID) Target webhook ID. |
{- "error_code": 0,
- "http_code": 0,
- "internal_message": "string",
- "message": "string",
- "stacktrace": [
- "string"
]
}List logs for a specific webhook.
| webhook_id required | string <uuid> (Webhook ID) Target webhook ID. |
[- {
- "log_id": "14b5977f-7a80-40ca-bb79-eca6c2abdb34",
- "webhook_id": "a47606a1-5b39-4a81-9480-c2cb738ff675",
- "created_at": "2019-08-24T14:15:22Z",
- "duration_in_ms": 0,
- "status_code": 0,
- "response_body": "string"
}
]Get all settings for a specific environment, such as the public encryption key used to verify webhook payloads, etc.
| environment_id required | string <uuid> (Ext_EnvironmentId) Unique identifier of an environment |
{- "public_verification_key": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "key": "string",
- "algorithms": [
- {
- "description": "string",
- "name": "string",
- "value": "string"
}
], - "http_headers": [
- {
- "description": "string",
- "name": "string",
- "value": "string"
}
]
}
}