Queries and mutations for managing Subscriptions in the platform.
Queries
Query Subscriptions
| Arguments | |
|---|---|
whereString | |
sortArray of String | |
limitInt | |
offsetInt | |
Get Subscription
| Arguments | |
|---|---|
idString | Queries with specified ID |
keyString | Queries with specified key |
Mutations
Create Subscription
Update Subscription
| Arguments | |
|---|---|
versionLong | |
actionsArray of SubscriptionUpdateAction | |
idString | Queries with specified ID |
keyString | Queries with specified key |
Delete Subscription
| Arguments | |
|---|---|
versionLong | |
idString | Queries with specified ID |
keyString | Queries with specified key |
Output types
CommercetoolsSubscription
keyString | |
destination | |
messagesArray of MessageSubscription | |
changesArray of ChangeSubscription | |
eventsArray of EventSubscription | |
format | |
status | Can be ConfigurationError, ConfigurationErrorDeliveryStopped, Healthy, ManuallySuspended, or TemporaryError |
idString | |
versionLong | |
createdAt | |
lastModifiedAt | |
createdBy | |
lastModifiedBy |
CommercetoolsSubscriptionQueryResult
offsetInt | |
countInt | |
totalLong | |
existsBoolean | |
resultsArray of CommercetoolsSubscription |
ChangeSubscription
EventSubscription
For EventSubscription, the format of the payload is custom for each specific notification.
resourceTypeIdString | Unique identifier for the type of resource. |
typesArray of String | Must contain valid event types for the resource.
For example, for resource type import-api the event type ImportContainerCreated is valid.
If no types are given, the Subscription will receive all events for the defined resource type. |
MessageSubscription
resourceTypeId is a String, not an enum. For MessageSubscription, it accepts the values listed in MessageSubscriptionResourceTypeId. The same applies to ChangeSubscription with ChangeSubscriptionResourceTypeId, and to EventSubscription with EventSubscriptionResourceTypeId.resourceTypeIdString | Unique identifier for the type of resource, for example, order. |
typesArray of String | Must contain valid message types for the resource. For example, for resource type product the message type ProductPublished is valid.
If no types of messages are given, the Subscription will receive all messages for this resource. |
SubscriptionHealthStatus
ConfigurationErrorConfigurationErrorDeliveryStoppedHealthyManuallySuspendedTemporaryError
AwsAuthenticationMode
CredentialsIAM
Destination
typeString |
SQSDestination
queueUrlString | |
accessKeyString | |
accessSecretString | |
regionString | |
authenticationMode | Can be Credentials, or IAM |
typeString |
SNSDestination
topicArnString | |
accessKeyString | |
accessSecretString | |
authenticationMode | Can be Credentials, or IAM |
typeString |
EventBridgeDestination
sourceString | URN for the EventBridge destination. |
regionString | AWS region that receives the events. |
accountIdString | ID of the AWS account that receives the events. |
typeString |
AzureServiceBusDestination
Send permission.connectionStringString | SharedAccessKey is partially hidden on retrieval for security reasons. |
typeString |
GoogleCloudPubSubDestination
topic must give the pubsub.topics.publish permission to the service account subscriptions@commercetools-platform.iam.gserviceaccount.com.
If used with the CloudEventsFormat, the notification conforms to the PubSub Protocol Binding of the Structured Content Mode.projectIdString | ID of the Google Cloud project that contains the Pub/Sub topic. |
topicString | Name of the topic. |
typeString |
ConfluentCloudDestination
SASL_SSL forsecurity.protocol, PLAIN forsasl.mechanism, and the default value (1048576) for max.request.size.bootstrapServerString | URL to the bootstrap server including the port number in the format <xxxxx>.<region>.<provider>.confluent.cloud:9092. |
apiKeyString | Partially hidden on retrieval for security reasons. |
apiSecretString | Partially hidden on retrieval for security reasons. |
acksString | The Kafka acks value. |
topicString | The name of the topic. |
keyString | The Kafka record key. |
typeString |
EventGridDestination
uriString | |
accessKeyString | |
typeString |
NotificationFormat
typeString |
PlatformFormat
typeString |
CloudEventsSubscriptionsFormat
typeString | |
cloudEventsVersionString |
Input types
SubscriptionDraft
messages, changes, or events must be set.keyString | User-defined unique identifier for the Subscription. |
destination | Messaging service to which the notifications are sent. |
messagesArray of MessageSubscriptionInput | Messages to be subscribed to. |
changesArray of ChangeSubscriptionInput | Changes to be subscribed to. |
eventsArray of EventSubscriptionInput | Events to be subscribed to. |
format | Format in which the payload is delivered. When not provided, the PlatformFormat is selected by default. |
ChangeSubscriptionInput
resourceTypeIdString |
EventSubscriptionInput
resourceTypeIdString | |
typesArray of String |
MessageSubscriptionInput
resourceTypeIdString | |
typesArray of String |
DestinationInput
type field. In GraphQL, the input has one field per destination type instead: SQS, SNS, AzureServiceBus, EventGrid, GoogleCloudPubSub, EventBridge, and ConfluentCloud. These names match the type values of Destination in REST. The deprecated IronMQ destination isn't available in GraphQL.SQS | |
SNS | |
AzureServiceBus | |
EventGrid | |
GoogleCloudPubSub | |
EventBridge | |
ConfluentCloud |
SQSDestinationInput
queueUrlString | |
accessKeyString | |
accessSecretString | |
regionString | |
authenticationMode | Can be Credentials, or IAMDefault: Credentials |
SNSDestinationInput
topicArnString | |
accessKeyString | |
accessSecretString | |
authenticationMode | Can be Credentials, or IAMDefault: Credentials |
EventBridgeDestinationInput
regionString | |
accountIdString |
AzureServiceBusDestinationInput
connectionStringString |
GoogleCloudPubSubDestinationInput
projectIdString | |
topicString |
ConfluentCloudDestinationInput
bootstrapServerString | |
apiKeyString | |
apiSecretString | |
acksString | |
topicString | |
keyString |
EventGridDestinationInput
uriString | |
accessKeyString |
SubscriptionFormatInput
Platform | |
CloudEvents |
PlatformFormatInput
dummyString |
CloudEventsSubscriptionsFormatInput
cloudEventsVersionString |
SubscriptionUpdateAction
changeDestination | |
setChanges | |
setEvents | |
setKey | |
setMessages |
Update actions
Change Destination
destination |
Set Changes
changesArray of ChangeSubscriptionInput |
Set Events
eventsArray of EventSubscriptionInput |
Set Key
keyString |
Set Messages
messagesArray of MessageSubscriptionInput |