Subscriptions and Status Callback URLs
Compatibility: from Durst Workflow v1.7.6
Available in
Durst Workflow Print Label / Durst Workflow Print Label +
Durst Workflow Print / Durst Workflow Print +
The following steps specify how to create a Subscriber and Subscriptions in the Durst Workflow to receive status updates via callback URLs. The first step is to create a Subscriber as mentioned below. To create a Subscription to a topic see the following chapters.
Both objects can be updated (changing the password of the Subscriber / changing status of the Subscription (INACTIVE - unsubscribe).
The response contains the id of the Subscriber to be used for creating a Subscription.
POST /api/v1/subscribers/create
1.1. Parameters
Type |
Name |
Description |
Schema |
---|---|---|---|
Body |
subscriberApi required |
Create a Subscriber |
SubscriberApi |
Body |
JWTSigningInfo optional |
signs the message with a JWT hash |
JWTSigningInfo |
Body |
XAuthInfo optional |
x-auth token |
XAuthInfo |
1.2. Responses
HTTP Code | Description | Schema |
---|---|---|
201 | Created | SubscriberApi |
401 | Unauthorized | No Content |
403 | Forbidden | No Content |
404 | Not Found | No Content |
1.3. Consumes
application/json
1.4. Produces
*/*
1.5. Tags
Subscriber Controller Api
1.6. Example HTTP request with x Auth
Request path
/api/v1/subscribers/create
Request body
{
"externalAuthType": "XAUTH",
"hostUri": "https://domain.at:443/base/path/",
"xAuthInfo": {
"password": "password",
"user": "user"
}
}
1.7. Example HTTP response with x Auth
Response 201
{
"id": 17,
"hostUri": "https://domain.at:443/base/path/",
"externalAuthType": "XAUTH",
"xAuthInfo": {
"user": "user",
"password": "FbSSYRbd9QpUBtyvVOr52A=="
}
}
1.8. Example HTTP request without Authentification
Request path
/api/v1/subscribers/create
Request body
{
"externalAuthType": "NONE",
"hostUri": "https://domain.at:443/base/path/"
}
1.9. Example HTTP response without Authentification
Response 201
{
"id": 20,
"hostUri": "https://domain.at:443/base/path/",
"externalAuthType": "NONE"
}
1.10. Example HTTP request with JWT Signing
Request path
/api/v1/subscribers/create
Request body
{
"externalAuthType": "JWT_SIGNING",
"hostUri": "https://domain.at:443/base/path/",
"jwtSigningInfo": {
"httpHeaderName": "x-jwt-token",
"key": "string",
"method": "HS256"
}
}
1.11. Example HTTP response with JWT Signing
Response 201
{
"id": 35,
"hostUri": "https://domain.at:443/base/path/",
"externalAuthType": "JWT_SIGNING",
"jwtSigningInfo": {
"httpHeaderName": "x-jwt-token",
"method": "HS256",
"key": "3IgPH7Gok2F+z9ZJ9zItbw=="
}
}
Compatibility: from Durst Workflow v1.7.6
Available in
Durst Workflow Print Label / Durst Workflow Print Label +
Durst Workflow Print / Durst Workflow Print +
Update parameters for a Subscriber with a corresponding ID
PUT /api/v1/subscribers/{id}
2.1. Parameters
Type |
Name |
Description |
Schema |
---|---|---|---|
Path | id required | The ID of the Subscriber | integer (int32) |
Body |
subscriberApi required |
Create a Subscriber |
SubscriberApi |
Body |
JWTSigningInfo optional |
Signs the message with a JWT hash |
JWTSigningInfo |
Body |
XAuthInfo optional |
x-auth token |
XAuthInfo |
2.2. Responses
HTTP Code | Description | Schema |
---|---|---|
201 | Created | SubscriberApi |
401 | Unauthorized | No Content |
403 | Forbidden | No Content |
404 | Not Found | No Content |
2.3. Consumes
application/json
2.4. Produces
*/*
2.5. Tags
Subscriber Controller Api
2.6. Example HTTP request with x Auth
Request path
/api/v1/subscribers/{id}
Request body
{
"externalAuthType": "XAUTH",
"hostUri": "https://domain.at:443/base/path/",
"xAuthInfo": {
"password": "password",
"user": "user"
}
}
2.7. Example HTTP response with x Auth
Response 201
{
"id": 17,
"hostUri": "https://domain.at:443/base/path/",
"externalAuthType": "XAUTH",
"xAuthInfo": {
"user": "user",
"password": "FbSSYRbd9QpUBtyvVOr52A=="
}
}
2.8. Example HTTP request without Authentification
Request path
/api/v1/subscribers/{id}
Request body
{
"externalAuthType": "NONE",
"hostUri": "https://domain.at:443/base/path/"
}
2.9. Example HTTP response without Authentification
Response 201
{
"id": 20,
"hostUri": "https://domain.at:443/base/path/",
"externalAuthType": "NONE"
}
2.10. Example HTTP request with JWT Signing
Request path
/api/v1/subscribers/create
Request body
{
"externalAuthType": "JWT_SIGNING",
"hostUri": "https://domain.at:443/base/path/",
"jwtSigningInfo": {
"httpHeaderName": "x-jwt-token",
"key": "string",
"method": "HS256"
}
}
2.11. Example HTTP response with JWT Signing
Response 201
{
"id": 35,
"hostUri": "https://domain.at:443/base/path/",
"externalAuthType": "JWT_SIGNING",
"jwtSigningInfo": {
"httpHeaderName": "x-jwt-token",
"method": "HS256",
"key": "3IgPD8kok2F+z9ZJ9zItbw=="
}
}
Compatibility: from Durst Workflow v1.7.6
Available in
Durst Workflow Print Label / Durst Workflow Print Label +
Durst Workflow Print / Durst Workflow Print +
Get information stored for a specific Subscriber
GET /api/v1/subscribers/{id}
3.1. Parameters
Type |
Name |
Description |
Schema |
---|---|---|---|
Path |
id required |
The id of the Subscriber | integer (int32) |
3.2. Responses
HTTP Code | Description | Schema |
---|---|---|
200 | OK | SubscriberApi |
401 | Unauthorized | No Content |
403 | Forbidden | No Content |
404 | Not Found | No Content |
3.3. Consumes
application/json
3.4. Produces
*/*
3.5. Tags
Subscriber Controller Api
3.6. Example HTTP request
Request path
/api/v1/subscribers/{id}
3.7. Example HTTP response
Response 200
{
"id": 35,
"hostUri": "https://domain.at:443/base/path/",
"externalAuthType": "JWT_SIGNING",
"jwtSigningInfo": {
"httpHeaderName": "x-jwt-token",
"method": "HS256",
"key": "3IgPD8kok2F+z9ZJ9zItbw=="
}
}
Compatibility: from Durst Workflow v1.7.6
Available in
Durst Workflow Print Label / Durst Workflow Print Label +
Durst Workflow Print / Durst Workflow Print +
A Subscriber can subscribe to different topics, which might be explicit jobs (identified by its id) or all Production Jobs. By using STATUS/* every status update (motif, article, production_job and print_order) will be sent to the subscriber. With STATUS/PRODUCTION_JOB/* the status updates of all Production Jobs will be sent to the Subscriber. You can also Subscribe to a specific Production Job by adding the corresponding ID e.g. STATUS/PRODUCTION_JOB/122
The value "path" is optional, if null - the status update will be sent to the host-uri
The response contains the subscriptionID.
POST /api/v1/subscribers/{id}/subscriptions/create
4.1. Parameters
Type |
Name |
Description |
Schema |
---|---|---|---|
Path | id required | The id of an existing Subscriber | integer (int32) |
Body | SubscriptionApi required | Parameters for Subscription | SubscriptionApi |
4.2. Responses
HTTP Code | Description | Schema |
---|---|---|
201 | Created |
SubscriptionApi |
401 | Unauthorized | No Content |
403 | Forbidden | No Content |
404 | Not Found | No Content |
4.3. Consumes
application/json
4.4. Produces
*/*
4.5. Tags
Subscription Controller Api
4.6. Example HTTP
Request path
/api/v1/subscribers/{id}/subscriptions/create
Request body
{
"path": "path/after/baseUri",
"status": "ACTIVE",
"topic": "STATUS/*"
}
4.7. Example HTTP response
Response 201
{
"id": 4,
"path": "path/after/baseUri/",
"topic": "STATUS/*",
"status": "ACTIVE"
}
Compatibility: from Durst Workflow v1.7.6
Available in
Durst Workflow Print Label / Durst Workflow Print Label +
Durst Workflow Print / Durst Workflow Print +
Use the Update a Subscription to e.g. set an existing Subscription to inactive or to subscribe to another topic.
PUT /api/v1/subscribers/{id}/subscriptions/{subscriptionId}
5.1. Parameters
Type |
Name |
Description |
Schema |
---|---|---|---|
Path | id required | The id of an existing Subscriber | integer (int32) |
Path | subscriptionId required | The id of an existing Subscription | integer (int32) |
Body | SubscriptionApi required | Parameters for Subscription |
SubscriptionApi |
5.2. Responses
HTTP Code | Description | Schema |
---|---|---|
201 | Created |
SubscriptionApi |
401 | Unauthorized | No Content |
403 | Forbidden | No Content |
404 | Not Found | No Content |
5.3. Consumes
application/json
5.4. Produces
*/*
5.5. Tags
Subscription Controller Api
5.6. Example HTTP
Request path
/api/v1/subscribers/{subscriberId}/subscriptions/{subscriptionId}
Request body
{
"path": "path/after/baseUri",
"status": "INACTIVE",
"topic": "STATUS/*"
}
5.7. Example HTTP response
Response 201
{
"id": 4,
"path": "path/after/baseUri/",
"topic": "STATUS/*",
"status": "INACTIVE"
}
Compatibility: from Durst Workflow v1.7.6
Available in
Durst Workflow Print Label / Durst Workflow Print Label +
Durst Workflow Print / Durst Workflow Print +
Get a list of existing Subscriptions for an existing Subscriber
GET /api/v1/subscribers/{id}/subscriptions
6.1. Parameters
Type |
Name |
Description |
Schema |
---|---|---|---|
Path |
id required |
The id of an existing Subscriber |
integer (int32) |
6.2. Responses
HTTP Code | Description | Schema |
---|---|---|
200 | OK | SubscriberApi |
401 | Unauthorized | No Content |
403 | Forbidden | No Content |
404 | Not Found | No Content |
6.3. Consumes
application/json
6.4. Produces
*/*
6.5. Tags
Subscription Controller Api
6.6. Example HTTP request
Request path
/api/v1/subscribers/{subscriberId}/subscriptions
6.7. Example HTTP response
Response 200
{
{
"id": 4,
"path": "path/after/baseUri/",
"topic": "STATUS/*",
"status": "ACTIVE"
},
{
"id": 3,
"path": "path/after/baseUri/",
"topic": "STATUS/PRODUCTION_JOB/*",
"status": "ACTIVE"
}
]
Compatibility: from Durst Workflow v1.7.6
Available in
Durst Workflow Print Label / Durst Workflow Print Label +
Durst Workflow Print / Durst Workflow Print +
Get an existing Subscription for a specific Subscriber
GET /api/v1/subscribers/{id}/subscriptions/{subscriptionId}
7.1. Parameters
Type |
Name |
Description |
Schema |
---|---|---|---|
Path |
id required |
The id of an existing Subscriber |
integer (int32) |
Path |
subscriptionId required |
The id of an en existing Subscription |
integer (int32) |
7.2. Responses
HTTP Code | Description | Schema |
---|---|---|
200 | OK | SubscriberApi |
401 | Unauthorized | No Content |
403 | Forbidden | No Content |
404 | Not Found | No Content |
7.3. Consumes
application/json
7.4. Produces
*/*
7.5. Tags
Subscription Controller Api
7.6. Example HTTP request
Request path
/api/v1/subscribers/{subscriberId}/subscriptions
7.7. Example HTTP response
Response 200
{
{
"id": 4,
"path": "path/after/baseUri/",
"topic": "STATUS/*",
"status": "ACTIVE"
},
{
"id": 3,
"path": "path/after/baseUri/",
"topic": "STATUS/PRODUCTION_JOB/*",
"status": "ACTIVE"
}
]
Compatibility: from Durst Workflow v1.7.6
Available in
Durst Workflow Print Label / Durst Workflow Print Label +
Durst Workflow Print / Durst Workflow Print +
For Development Purposes: Sends a callback to the defined hostUris with a fake status change of the Production Job to all active Subscribers.
GET /api/v1/subscribers/testresponse/{productionJobId}
8.1. Parameters
Type |
Name |
Description |
Schema |
---|---|---|---|
Path |
productionJobId required |
The id of an existing ProductionJob |
integer (int32) |
8.2. Responses
HTTP Code | Description | Schema |
---|---|---|
200 | OK |
SubscriberApi |
401 | Unauthorized | No Content |
403 | Forbidden | No Content |
404 | Not Found | No Content |
8.3. Consumes
application/json
8.4. Produces
*/*
8.5. Tags
Subscriber Controller Api
8.6. Example HTTP request
Request path
/api/v1/subscribers/{subscriberId}/subscriptions
8.7. Example HTTP response
Response 200
no content