RenderingService API
This API can be used to run rendering pipelines through the Rendering Service module. Typically, you don't have to use it directly.
Rendering Service is used to perform tasks to process orders your customers place on your online store. You may create a description of a job pipeline which should be run for a specified project. This pipeline may consist of the tasks like this:
- Download the user's design from a project.
- Convert a design to PDF file.
- Send artifact (PDF file) to FTP server.
- Call a specific URL.
- ... etc.
When a task creates a file as a result, it is saved as an artifact. Artifacts may be consumed in the upstream tasks or marked as "final", so that you could download it once the job is finished.
Api Clients
.Net Client
You can install it from Nuget as follows:
Install-Package Aurigma.RenderingService.ApiClient
Angular Client
This client is compatible with Angular applications only. It won't work with NodeJS or other frontend JS frameworks. You can install the package to your Angular application as follows:
npm install @aurigma/ng-rendering-service-client
NodeJS Client (Axious)
This client can be used in a wide range of JavaScript applications. To make API calls, it uses Axios - a popular HTTP library. Although it is possible to use it in both frontend and backend projects, the primary target platform for this library is NodeJS.
Install the package as follows:
npm install @aurigma/axios-rendering-service-api-client
PHP Client
PHP client can be installed through composer as follows:
composer require aurigma/php-rendering-service-client
BuildInfo
These endpoints are used to get the technical information about the service such as version, build date and similar. They are also useful for a quick test whether the service is available. All of them are working in the same way and return the same information - use the HEAD or GET flavor of this endpoint based on your preference.
HeadInfo
Gets assembly build info
Request
HEAD /api/rendering/v1/info
Responses
Status Code | Type | Description | Samples |
---|---|---|---|
200 | Success |
||
Headers | |||
X-Aurigma-Version | string | A version number |
|
X-Aurigma-Build-Date | string | A build date (UTC) |
|
X-Aurigma-Configuration | string | A build configuration (Debug | Release) |
|
X-Aurigma-App-Name | string | A service name |
GetInfo
Gets assembly build info
Request
GET /api/rendering/v1/info
Responses
Status Code | Type | Description | Samples |
---|---|---|---|
200 |
|
Success |
RenderingJobs
These endpoints are used to manage rendering jobs.
GetAll
Returns all rendering jobs relevant to the specified query parameters.
Request
GET /api/rendering/v1/jobs[?status&projectId&skip&take&sorting&tenantId&userId]
Parameters
Name | In | Type | Default | Notes |
---|---|---|---|---|
status | query | Rendering job status filter. |
||
projectId | query | Rendering job associated project filter. |
||
skip | query | Defines page start offset from beginning of sorted result list. |
||
take | query | Defines page length (how much consequent items of sorted result list should be taken). |
||
sorting | query | Defines sorting order of result list e.g.: "Title ASC, LastModified DESC". |
||
tenantId | query | Tenant identifier. |
||
userId | query | Rendering job owner. |
Responses
Status Code | Type | Description | Samples |
---|---|---|---|
200 |
|
Success |
|
401 | Unauthorized |
||
403 | Forbidden |
Create
Creates a new rendering job and starts its execution from the very first task.
Request
POST /api/rendering/v1/jobs[?tenantId&userId]
Parameters
Name | In | Type | Default | Notes |
---|---|---|---|---|
tenantId | query | Tenant identifier. |
||
userId | query | Rendering job owner. |
||
body | body |
|
Create operation parameters. |
Responses
Status Code | Type | Description | Samples |
---|---|---|---|
201 |
|
Success |
|
401 | Unauthorized |
||
403 | Forbidden |
Get
Returns a rendering job by ID.
Request
GET /api/rendering/v1/jobs/{id}[?tenantId&userId]
Parameters
Name | In | Type | Default | Notes |
---|---|---|---|---|
*id | path | Rendering job unique identifier. |
||
tenantId | query | Tenant identifier. |
||
userId | query | Rendering job owner. |
Responses
Status Code | Type | Description | Samples |
---|---|---|---|
200 |
|
Success |
|
404 |
|
Not Found |
|
401 | Unauthorized |
||
403 | Forbidden |
Delete
Deletes specified rendering job.
Request
DELETE /api/rendering/v1/jobs/{id}[?tenantId]
Parameters
Name | In | Type | Default | Notes |
---|---|---|---|---|
*id | path | Rendering job unique identifier. |
||
tenantId | query | Tenant identifier. |
Responses
Status Code | Type | Description | Samples |
---|---|---|---|
200 |
|
Success |
|
404 |
|
Not Found |
|
401 | Unauthorized |
||
403 | Forbidden |
Discard
Discards the specified rendering job and prevents its further execution.
Request
POST /api/rendering/v1/jobs/{id}/discard[?tenantId&userId]
Parameters
Name | In | Type | Default | Notes |
---|---|---|---|---|
*id | path | Rendering job unique identifier. |
||
tenantId | query | Tenant identifier. |
||
userId | query | Rendering job owner. |
Responses
Status Code | Type | Description | Samples |
---|---|---|---|
200 | boolean | Success |
|
401 | Unauthorized |
||
403 | Forbidden |
Recover
Recovers the specified rendering job and continues its execution from the failed task.
Request
POST /api/rendering/v1/jobs/{id}/recover[?tenantId&userId]
Parameters
Name | In | Type | Default | Notes |
---|---|---|---|---|
*id | path | Rendering job unique identifier. |
||
tenantId | query | Tenant identifier. |
||
userId | query | Rendering job owner. |
Responses
Status Code | Type | Description | Samples |
---|---|---|---|
200 | boolean | Success |
|
401 | Unauthorized |
||
403 | Forbidden |
Restart
Restarts the specified rendering job and begins its execution from the very first task.
Request
POST /api/rendering/v1/jobs/{id}/restart[?tenantId&userId]
Parameters
Name | In | Type | Default | Notes |
---|---|---|---|---|
*id | path | Rendering job unique identifier. |
||
tenantId | query | Tenant identifier. |
||
userId | query | Rendering job owner. |
Responses
Status Code | Type | Description | Samples |
---|---|---|---|
200 | boolean | Success |
|
401 | Unauthorized |
||
403 | Forbidden |
Definitions
BuildInfoModel
Information about a service
Name | Type | Notes |
---|---|---|
version | string | Version number |
buildDate | string | Build date (UTC) |
configuration | string | Build configuration (Debug | Release) |
appName | string | Service name |
PagedOfRenderingJobDto
Paged view of
Name | Type | Notes |
---|---|---|
total | integer (int64) | Items count. |
items |
|
Items list. |
RenderingJobDto
Items list.
Name | Type | Notes |
---|---|---|
project |
|
Project description. |
tasks |
|
Rendering task list. |
status |
|
Rendering job status. |
statusDescription | string | Rendering job status description (error message if rendering job is in error state, otherwise empty). |
created | string (date-time) | Rendering job creation timestamp. |
started | string (date-time) | Rendering job launch timestamp. |
finished | string (date-time) | Rendering job completion timestamp. |
tenantId | integer (int32) | Entity tenant identifier. |
id | string | Entity unique identifier. |
ownerId | string | Entity owner identifier. |
lastModified | string (date-time) | Last entity modification date and time. |
ProjectInfo
Project description.
Name | Type | Notes |
---|---|---|
id | integer (int32) | Project identifier. |
ownerId | string | Project owner identifier. |
name | string | Project name. |
orderId | string | Project order identifier. |
orderNumber | string | Project order number. |
customerId | string | Project order customer identifier. |
customerName | string | Project order customer name. |
items |
|
List of project items. |
ProjectItemInfo
List of project items.
Name | Type | Notes |
---|---|---|
name | string | Project item name. |
quantity | integer (int32) | Project item quantity. |
fields | object | Project item custom informational fields. |
designIds | array | Project item design identifiers. |
RenderingTaskDto
Rendering task list.
Name | Type | Notes |
---|---|---|
description | string | Rendering task description. |
id | string | Rendering task identifier. |
name | string | Rendering task name. It should be unique within job task list. |
namespace | string | Rendering task namespace. It is used to find appropriate task processor. |
type | string | Rendering task type. It is used to find appropriate task processor. /// |
inputArtifacts | array | Input artifacts alias list. Defines task arguments which should be taken from artifacts storage. |
parameters | object | Rendering task processing parameters. |
outputArtifacts | array | Output artifacts alias list. Defines task results which should be saved in artifacts storage. |
finalArtifacts | array | Final artifacts alias list. Defines which task results should be included in job results. |
status |
|
Rendering task status. |
requested | string (date-time) | Rendering task 'processing requested' timestamp. |
started | string (date-time) | Rendering task 'processing started' timestamp. |
finished | string (date-time) | Rendering task 'processing completed' timestamp. |
processingTimeout | integer (int32) | Rendering task processing timeout. |
autoRetryCount | integer (int32) | Rendering task automatic retry count value. |
longExecution | boolean | Rendering task 'long execution' tag. |
RenderingTaskStatus
Rendering task status.
Enum Values
New InProgress Completed Failed RequestFailed Pending Skipped
RenderingJobStatus
Rendering job status.
Enum Values
New InProgress Completed Failed Recovered Discarded
CreateRenderingJobDto
Create operation parameters.
Name | Type | Notes |
---|---|---|
project | Project description. |
|
tasks |
|
Rendering task list. |
CreateRenderingTaskDto
Rendering task list.
Name | Type | Notes |
---|---|---|
description | string | Rendering task description. |
name | string | Rendering task name. It should be unique within job task list. |
namespace | string | Rendering task namespace. It is used to find appropriate task processor in conjunction with 'Type' property. |
type | string | Rendering task type. It is used to find appropriate task processor in conjunction with 'Namespace' property. /// |
inputArtifacts | array | Input artifacts alias list. Defines task arguments which should be taken from artifacts storage. |
parameters | object | Task processing parameters dictinary. |
outputArtifacts | array | Output artifacts alias list. Defines task results which should be saved in artifacts storage. |
finalArtifacts | array | Final artifacts alias list. Defines which task results should be included in job results. |
processingTimeout | integer (int32) | Task processing timeout. |
maxAutoRetryCount | integer (int32) | Task processing automatic retry count limit. |
ProblemDetails
Name | Type | Notes |
---|---|---|
type | string | |
title | string | |
status | integer (int32) | |
detail | string | |
instance | string |