Create an integration
POST/integrations
Create an integration.
Request
- application/json
Body
- AWSSQSConfigurationObject
- WebhookConfigurationObject
- STOMPConfigurationObject
data IntegrationCreaterequired
Possible values: [integration
]
Default value: integration
The type represents the object being returned. Always integration
.
The name of the integration.
A description of what the integration is for.
Whether the integration is enabled.
Possible values: [webhook
, aws_sqs
, stomp
]
Default value: webhook
Specifies how the event is delivered. The options are webhook
, aws-sqs
, or stomp
.
The list of events you want to observe. See Observable Events.
configuration object required
The content of the configuration object depends on the value of integration_type
.
The required SQS queue URL.
The required AWS access key ID.
The required AWS secret key ID.
The required AWS region.
A required URL that the integration fires.
An optional header. Useful to authenticate the response came from Elastic Path. This is sent as X-MOLTIN-SECRET-KEY
.
The username used to authenticate against a STOMP server.
The password used to authenticate against a STOMP server.
The destination in the messaging queuing system.
The addresses that correspond with the destination name.
Responses
- 200
- 422
- 500
Success. Integration created.
- application/json
- Schema
- Example (from schema)
Schema
- AWSSQSConfigurationObject
- WebhookConfigurationObject
- STOMPConfigurationObject
data object
The unique identifier of the integration.
Possible values: [integration
]
Default value: integration
The type represents the object being returned. Always integration
.
The name of the integration.
A description of what the integration is for.
Whether the integration is enabled.
Possible values: [webhook
, aws_sqs
, stomp
]
Default value: webhook
Specifies how the event is delivered. The options are webhook
, aws-sqs
, or stomp
.
The list of events you want to observe. See Observable Events.
configuration object
The required SQS queue URL.
The required AWS access key ID.
The required AWS secret key ID.
The required AWS region.
A required URL that the integration fires.
An optional header. Useful to authenticate the response came from Elastic Path. This is sent as X-MOLTIN-SECRET-KEY
.
The username used to authenticate against a STOMP server.
The password used to authenticate against a STOMP server.
The destination in the messaging queuing system.
The addresses that correspond with the destination name.
links object
Links are used to allow you to move between requests.
Single entities use a self parameter with a link to that specific resource.
meta object
timestamps Timestamps
The date and time a transaction is created.
The date and time an integration is updated.
The date and time an integration is updated.
{
"data": {
"id": "2da46671-b4c2-44ac-b133-d1221aafc77b",
"type": "integration",
"name": "Order shipping notification",
"description": "Send a shipping notification via email with discount code",
"enabled": true,
"integration_type": "webhook",
"observes": [
"string"
],
"configuration": {
"url": "https://sqs.eu-west-1.amazonaws.com/123456789/epcc-external-queue",
"aws_access_key_id": "****************JIMB",
"aws_secret_access_key": "************************************HK4o",
"region": "eu-west-1"
},
"links": {
"self": "?page[offset]=0&page[limit]=25"
},
"meta": {
"timestamps": {
"created_at": "2017-07-21T17:32:28Z",
"updated_at": "2017-07-21T17:32:28Z"
}
}
}
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- missing-name
Schema
- Array [
- ]
errors ErrorBody[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred."
}
]
}
{
"errors": [
{
"title": "Validation Error",
"status": 400,
"detail": "Your request was invalid"
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors ErrorBody[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred."
}
]
}
{
"errors": [
{
"title": "Internal Server Error",
"status": 500
}
]
}