Deploy API (2020-09-124T13:52:27Z)

Download OpenAPI specification:Download

Introduction

The Deploy RESTful API can be used to enable and monitor the deployment of packages containing document flows in projects and environments.

Enabling document flow

A first step would be to enable document flow for your environments in your project. By enabling document flow for an environment, document flow projects will be detected and will be deployed. You need to enable each environment individually. After this, deployment of document flow projects will be possible.

Note that enabling an environment will also trigger a deploy of all packages already present.

The base URL for the Deploy RESTful API is https://deploy.compose.platform.unifiedpost.com/api

Deploys caused by modifications

For all environments, except for the first one, deployment happens automatically when a file in the document flow project changes. The system will monitor the base path of the environment. If a change happens, the system will figure out whether it belongs to a document flow project and will deploy or redeploy the project accordingly. This means that packages can simply be promoted using Resource Promotion and the new version will come online.

Deploys triggered by an API call

The first environment of a projects isn't automatically deployed in response to a modification because this environment is likely mapped to your local designer workspace and will receive many updates while you're developing your package. For the first environment in a project, a deploy can be triggered manually using the POST operation on /v1/documentflow/package. This call allows you to schedule a deploy of a specifc document flow project.

Deploys scheduled by the System

Finally, deploys can be triggered by the system to install system updates or apply bug fixes. This type of trigger can occur at any time on all environments.

Authentication

All requests to the Deploy API must be authenticated. See OAuth 2.0 for information on how to obtain security tokens and Performing authenticated requests on how to use them.

The Deploy API uses https://login.inventivedesigners.com as its authentication and authorization server.

Authorization

Users that make calls to the Deploy API should have permission output-center. In addition to this they should also have access to the different resources.

Api operation Operation Resource
list packages read runtime-engine://<accountName>/<projectID>/<environmentID>/deployment
list environments read runtime-engine://<accountName>/<projectID>/<environmentID>/deployment
update environment write runtime-engine://<accountName>/<projectID>/<environmentID>/deployment
list environments read runtime-engine://<accountName>/<projectID>/<environmentID>/deployment

Retry

When you are making requests at a higher rate than your usage plan allows an HTTP status code of 429 will be returned. In this case, you can safely retry this call, but you should lower the rate at which you are sending requests.

While our service is scaling, it is possible an HTTP status code of 500 or 504 might be returned rather than a 429. After a couple of seconds our service will have scaled up, and you can restart sending requests, which will be successfully handled again

Use

When the package is deployed, invoke it using the Xribe Output API by submitting a message with an input of type documentflow.

Deploy

Manage environments and deploy packages.

Enable/Disable environment

Enable or disable the document flow service for a given environment. Enabling an environment will also deploy all packages currently present in the environment.

Authorizations:
Request Body schema: application/json

Defines the environment to enable/disable the document flow service for.

projectID
required
string (GUID) <= 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the project containing the relevant environment.

environmentID
required
string (GUID) <= 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the relevant environment.

deploy
required
string (deployment) <= 36 characters (enabled)|(disabled)

Enable or disbale the provided environment.

object (tokens)

Tokens required to call other services, all values will be stored securely.

object (properties)

Properties passed to deploy. These properties can be referenced in the package descriptor (located in SCR_INF/scriptura.xml) using mustache syntax {{variablename}}

Responses

Request samples

Content type
application/json
Example
{
  • "projectID": "dcb398ba-1b8c-4afd-85fd-a5905e5f42c5",
  • "environmentID": "b4e0d9b7-16c4-4da3-b9b3-4ae3b52f5c8f",
  • "deploy": "enabled",
  • "tokens": {
    },
  • "properties": {
    }
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Retrieve environment details

Retrieve whether the given environment is document flow enabled.

Authorizations:
query Parameters
projectID
required
string (GUID) <= 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...
Example: projectID=dcb398ba-1b8c-4afd-85fd-a5905e5f42c5

The ID of the project containing the relevant environment.

environmentID
required
string (GUID) <= 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...
Example: environmentID=b4e0d9b7-16c4-4da3-b9b3-4ae3b52f5c8f

The ID of the relevant environment.

Responses

Response samples

Content type
application/json
{
  • "projectID": "dcb398ba-1b8c-4afd-85fd-a5905e5f42c5",
  • "environmentID": "b4e0d9b7-16c4-4da3-b9b3-4ae3b52f5c8f",
  • "deploy": "enabled"
}

List packages

Retrieve an annotated list of document flow packages found in the given environment.

Authorizations:
query Parameters
projectID
required
string (GUID) <= 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...
Example: projectID=dcb398ba-1b8c-4afd-85fd-a5905e5f42c5

The ID of the project containing the relevant environment.

environmentID
required
string (GUID) <= 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...
Example: environmentID=b4e0d9b7-16c4-4da3-b9b3-4ae3b52f5c8f

The ID of the relevant environment.

lastEvaluatedKey
string

Used for paging. When provided it is used as an exclusive start key for the returned items (returns the next 100 items after the previous returned ones)

Responses

Response samples

Content type
application/json
{
  • "projectID": "dcb398ba-1b8c-4afd-85fd-a5905e5f42c5",
  • "environmentID": "b4e0d9b7-16c4-4da3-b9b3-4ae3b52f5c8f",
  • "package": [
    ]
}

Trigger package deploy

Trigger a deploy of given document flow deployment package, this only works on the first environment

Authorizations:
Request Body schema: application/json

Defines the package to deploy

projectID
string (GUID) <= 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the project containing the relevant environment.

environmentID
string (GUID) <= 36 characters ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]...

The ID of the relevant environment.

packageID
string (deployment)

Package id to deploy.

Responses

Request samples

Content type
application/json
{
  • "projectID": "dcb398ba-1b8c-4afd-85fd-a5905e5f42c5",
  • "environmentID": "b4e0d9b7-16c4-4da3-b9b3-4ae3b52f5c8f",
  • "packageID": "showcase"
}

Response samples

Content type
application/json
{
  • "message": "string"
}