Client REST API

Concurrent Processing Framework

The Concurrent Processing Framework REST API allows client applications in Java, JavaScript or other programming languages to query the available business applications, create jobs and download the results of jobs on behalf of their users.

Most of the resources can return JSON or XML documents by appending the .json or .xml file format extension to the URI Templates before any query string parameters. JSON is the preferred format due to it's well defined map, list and value structure. Some resources that always return a specific data type will ignore the file format extension if specified.

The CPF REST API can also be accessed directly using a web browser by not specifying a file format extension. If a file format extension is not included in the request then the HTML user interface will be displayed instead of the resources described in this API. The HTML user interface allows full access to the CPF without any programming experience required. The HTML user interface will be slightly different from the responses described in this API.

Create Job With Multiple Requests

Construct a new new job containing multiple requests to be processed by the business application.

The service parameters must be passed using the multipart/form-data encoding in the body of a HTTP POST request (e.g. a HTML form).

In addition to the standard parameters listed in the API each business application has additional job and request parameters. The Get Business Applications Multiple resource should be consulted to get the full list of supported parameters.

Structured Input Data

For structured input data business applications the requests are specified using either a single inputData file or a single inputDataUrl can be specified. The file must be in the file format specified by a single inputDataContentType. The contents of the file must contain one record for each request to be processed in the batch job. The fields of each record must contain the request parameters supported by the business application. The names of the parameters are case sensitive.

Opaque input data

For opaque input data (e.g. JPEG image, ESRI Shapefile) the requests can be specified as one or more inputData files or one or more inputDataUrl parameters. It is not possible to mix inputData and inputDataUrl parameters in the same job. If all the requests have the same content type a single inputDataContentType can be specified. Otherwise an inputDataContentType must be specified for each inputData or inputDataUrl in the same order.

NOTE: The maximum size including all parameters and protocol overhead of a multi-part request is 20MB. Therefore inputDataUrl should be used instead of inputData where possible.

HTTP Request Methods

The resource can be accessed using the following HTTP request methods.

  • POST

URI Templates

The URI templates define the paths that can be appended to the base URL of the service to access this resource.

/ws/apps/{businessApplicationName}/multiple

URI Template Parameters

The URI templates support the following parameters which must be replaced with values as described below.

ParameterTypeDescription
{businessApplicationName}StringThe name of the business application.

Parameters

The resource supports the following parameters. For HTTP get requests these must be specified using query string parameters. For HTTP POST requests these can be specified using query string, application/x-www-form-urlencoded parameters or multipart/form-data unless otherwise specified. Array values [] can be specified by including the parameter multiple times in the request.

ParameterTypeDefaultRequiredDescription

HTTP Status Codes

The resource will return one of the following status codes. The HTML error page may include an error message. The descriptions of the messages and the cause are described below.

HTTP Status CodeDescription
200

In a client application the resource will be returned in the body of the HTTP response in the requested format. See ConcurrentProcessingFramework for the details returned.

302

In a web browser the user will be redirected to the ConcurrentProcessingFramework page.

500

Internal Server Error

This error indicates that there was an unexpected error on the server. This is sometimes temporary so try again after a few minutes. The problem could also be caused by bad input data so verify all input parameters and files. If the problem persists contact the support desk with exact details of the parameters you were using.

Create Job With Single Request

Construct a new new job containing multiple requests to be processed by the business application.

The job and request parameters for the business application must be passed using the multipart/form-data encoding in the body of a HTTP POST request (e.g. a HTML form).

In addition to the standard parameters listed in the API each business application has additional job and request parameters. The Get Business Applications Single resource should be consulted to get the full list of supported parameters.

Structured Input Data

For structured input data business applications the request parameters are specified in the HTTP POST form.

Opaque input data

For opaque input data (e.g. JPEG image, ESRI Shapefile) the requests can be specified as one inputData files or one inputDataUrl parameter. It is not possible to mix inputData and inputDataUrl parameters in the same job.

NOTE: The maximum size including all parameters and protocol overhead of a multi-part request is 20MB. Therefore inputDataUrl should be used instead of inputData where possible for opaque data.

HTTP Request Methods

The resource can be accessed using the following HTTP request methods.

  • POST

URI Templates

The URI templates define the paths that can be appended to the base URL of the service to access this resource.

/ws/apps/{businessApplicationName}/single

URI Template Parameters

The URI templates support the following parameters which must be replaced with values as described below.

ParameterTypeDescription
{businessApplicationName}StringThe name of the business application.

Parameters

The resource supports the following parameters. For HTTP get requests these must be specified using query string parameters. For HTTP POST requests these can be specified using query string, application/x-www-form-urlencoded parameters or multipart/form-data unless otherwise specified. Array values [] can be specified by including the parameter multiple times in the request.

ParameterTypeDefaultRequiredDescription

HTTP Status Codes

The resource will return one of the following status codes. The HTML error page may include an error message. The descriptions of the messages and the cause are described below.

HTTP Status CodeDescription
200

In a client application the resource will be returned in the body of the HTTP response in the requested format. See ConcurrentProcessingFramework for the details returned.

302

In a web browser the user will be redirected to the ConcurrentProcessingFramework page.

500

Internal Server Error

This error indicates that there was an unexpected error on the server. This is sometimes temporary so try again after a few minutes. The problem could also be caused by bad input data so verify all input parameters and files. If the problem persists contact the support desk with exact details of the parameters you were using.

Delete Job

Cancel the user's job. This will mark the job as cancelled and remove all requests and results from the job. The job will be removed after a few days.

This service should be invoked after the results from the job are downloaded. If this method is not called the job will automatically be deleted 7 days after the result download was started.

This method can also be used to cancel a job before it was finished. If a job was submitted in error or no longer required use this method to cancel the job to help free resources on the system to process other jobs.

HTTP Request Methods

The resource can be accessed using the following HTTP request methods.

  • DELETE

URI Templates

The URI templates define the paths that can be appended to the base URL of the service to access this resource.

/ws/jobs/{batchJobId}

URI Template Parameters

The URI templates support the following parameters which must be replaced with values as described below.

ParameterTypeDescription
{batchJobId}LongThe job identifier.

HTTP Status Codes

The resource will return one of the following status codes. The HTML error page may include an error message. The descriptions of the messages and the cause are described below.

HTTP Status CodeDescription
200

OK

If the job was deleted an empty response will be returned.

404

Not Found

If the job does not exist, has been deleted, or was owned by another user.

500

Internal Server Error

This error indicates that there was an unexpected error on the server. This is sometimes temporary so try again after a few minutes. The problem could also be caused by bad input data so verify all input parameters and files. If the problem persists contact the support desk with exact details of the parameters you were using.

Get Authenticated

Check that a user is authenticated. This can be used by JavaScript applications to force a login page to be displayed. Returns a map with authenticated=true if the user is authenticated. Response is undefined if the user is not authenticated as the authentication mechanism will not allow access to the resource.

HTTP Request Methods

The resource can be accessed using the following HTTP request methods.

  • GET

URI Templates

The URI templates define the paths that can be appended to the base URL of the service to access this resource.

/ws/authenticated

HTTP Status Codes

The resource will return one of the following status codes. The HTML error page may include an error message. The descriptions of the messages and the cause are described below.

HTTP Status CodeDescription
200

The resource will be returned in the body of the HTTP response in the requested format.

500

Internal Server Error

This error indicates that there was an unexpected error on the server. This is sometimes temporary so try again after a few minutes. The problem could also be caused by bad input data so verify all input parameters and files. If the problem persists contact the support desk with exact details of the parameters you were using.

Get Business Applications

Get the list of links to the Get Business Applications Resources resource for each business application the user is authorized to access.

The method returns a Resource Description document. Each child resource supports following custom attributes.

Business Application Fields
Attribute Description
businessApplicationName The name of the business application.

HTTP Request Methods

The resource can be accessed using the following HTTP request methods.

  • GET

URI Templates

The URI templates define the paths that can be appended to the base URL of the service to access this resource.

/ws/apps

HTTP Status Codes

The resource will return one of the following status codes. The HTML error page may include an error message. The descriptions of the messages and the cause are described below.

HTTP Status CodeDescription
200

The resource will be returned in the body of the HTTP response in the requested format.

500

Internal Server Error

This error indicates that there was an unexpected error on the server. This is sometimes temporary so try again after a few minutes. The problem could also be caused by bad input data so verify all input parameters and files. If the problem persists contact the support desk with exact details of the parameters you were using.

Get Business Applications Instant

The instant resource has the two modes described below, the specification mode and the execute instant request mode. If the format parameter is not included or the specification parameter equals true then the specification mode is enabled, otherwise the execute instant request mode is enabled.

Specification

Get the specification of the execute instant request mode of this service.

The method returns a Resource Description document with the following additional fields which are the parameters to the execute instant request mode..

Business Application Instant Fields
Attribute Description
description The description of services offered by the business application.
businessApplicationName The name of the business application.
businessApplicationTitle The display title of the business application.
businessApplicationDescription The description of services offered by the business application.
businessApplicationDescriptionUrl A link to a web page describing more details about the business application.
parameters

The array of parameters that can be passed to the service. Each parameter is an object containing the following fields.

Parameters
Attribute Description
name The case sensitive name of the parameter.
type The data type of the parameter.
description The description of the parameter.
descriptionUrl The link to a more detailed description of the parameter.
jobParameter Boolean flag indicating if the parameter can be specified globally on the job.
requestParameter Boolean flag indicating if the parameter can be specified on each request in the job.
inputDataContentTypes The array of MIME media types of input data accepted by the business application.
perRequestInputData Boolean flag indicating that the business application accepts opaque data (true) or structured data (false).
resultDataContentTypes The array of MIME media types of result data generated by the business application.
perRequestResultData Boolean flag indicating that the business application returns opaque data (true) or structured data (false).

Execute Instant Request

Execute a single instant request using the business application with the results returned in the request.

The job and request parameters for the business application must be passed using the query string parameters in a HTTP get request or application/form-url-encoded, multipart/form-data encoding in the body of a HTTP POST request (e.g. a HTML form).

In addition to the standard parameters listed in the API each business application has additional job and request parameters. Invoke the specification mode of this resource should be consulted to get the full list of supported parameters.

NOTE: The instant resource does not support opaque input data.

HTTP Request Methods

The resource can be accessed using the following HTTP request methods.

  • GET
  • POST

URI Templates

The URI templates define the paths that can be appended to the base URL of the service to access this resource.

/ws/apps/{businessApplicationName}/instant

URI Template Parameters

The URI templates support the following parameters which must be replaced with values as described below.

ParameterTypeDescription
{businessApplicationName}StringThe name of the business application.

Parameters

The resource supports the following parameters. For HTTP get requests these must be specified using query string parameters. For HTTP POST requests these can be specified using query string, application/x-www-form-urlencoded parameters or multipart/form-data unless otherwise specified. Array values [] can be specified by including the parameter multiple times in the request.

ParameterTypeDefaultRequiredDescription

HTTP Status Codes

The resource will return one of the following status codes. The HTML error page may include an error message. The descriptions of the messages and the cause are described below.

HTTP Status CodeDescription
200

The resource will be returned in the body of the HTTP response in the requested format.

403

If the user does not have permission for this resource on the business application.

404

If the business application does not exist, or is not enabled.

500

Internal Server Error

This error indicates that there was an unexpected error on the server. This is sometimes temporary so try again after a few minutes. The problem could also be caused by bad input data so verify all input parameters and files. If the problem persists contact the support desk with exact details of the parameters you were using.

Get Business Applications Jobs

Get the list of links to the Get Jobs Info resource for each of the user's jobs for the business application.

The method returns a Resource Description document. Each child resource supports following custom attributes.

Job Fields
Attribute Description
batchJobId The unique identifier of the job.
batchJobUrl The URL to the Get Jobs Info resource without the file format extension.
jobStatus The current status of the job.
creationTimestamp The time when the job was created.

HTTP Request Methods

The resource can be accessed using the following HTTP request methods.

  • GET

URI Templates

The URI templates define the paths that can be appended to the base URL of the service to access this resource.

/ws/apps/{businessApplicationName}/jobs

URI Template Parameters

The URI templates support the following parameters which must be replaced with values as described below.

ParameterTypeDescription
{businessApplicationName}StringThe name of the business application.

HTTP Status Codes

The resource will return one of the following status codes. The HTML error page may include an error message. The descriptions of the messages and the cause are described below.

HTTP Status CodeDescription
200

The resource will be returned in the body of the HTTP response in the requested format.

500

Internal Server Error

This error indicates that there was an unexpected error on the server. This is sometimes temporary so try again after a few minutes. The problem could also be caused by bad input data so verify all input parameters and files. If the problem persists contact the support desk with exact details of the parameters you were using.

Get Business Applications Multiple

Get the specification of the Create Job With Multiple Requests service.

The method returns a Resource Description document with the following additional fields which are the parameters to the Create Job With Multiple Requests service..

Business Application Fields
Attribute Description
description The description of services offered by the business application.
businessApplicationName The name of the business application.
businessApplicationTitle The display title of the business application.
businessApplicationDescription The description of services offered by the business application.
businessApplicationDescriptionUrl A link to a web page describing more details about the business application.
parameters

The array of parameters that can be passed to the service. Each parameter is an object containing the following fields.

Parameters
Attribute Description
name The case sensitive name of the parameter.
type The data type of the parameter.
description The description of the parameter.
descriptionUrl The link to a more detailed description of the parameter.
jobParameter Boolean flag indicating if the parameter can be specified globally on the job.
requestParameter Boolean flag indicating if the parameter can be specified on each request in the job.
inputDataContentTypes The array of MIME media types of input data accepted by the business application.
perRequestInputData Boolean flag indicating that the business application accepts opaque data (true) or structured data (false).
resultDataContentTypes The array of MIME media types of result data generated by the business application.
perRequestResultData Boolean flag indicating that the business application returns opaque data (true) or structured data (false).

HTTP Request Methods

The resource can be accessed using the following HTTP request methods.

  • GET

URI Templates

The URI templates define the paths that can be appended to the base URL of the service to access this resource.

/ws/apps/{businessApplicationName}/multiple

URI Template Parameters

The URI templates support the following parameters which must be replaced with values as described below.

ParameterTypeDescription
{businessApplicationName}StringThe name of the business application.

HTTP Status Codes

The resource will return one of the following status codes. The HTML error page may include an error message. The descriptions of the messages and the cause are described below.

HTTP Status CodeDescription
200

The resource will be returned in the body of the HTTP response in the requested format.

403

If the user does not have permission for this resource on the business application.

404

If the business application does not exist, or is not enabled.

500

Internal Server Error

This error indicates that there was an unexpected error on the server. This is sometimes temporary so try again after a few minutes. The problem could also be caused by bad input data so verify all input parameters and files. If the problem persists contact the support desk with exact details of the parameters you were using.

Get Business Applications Resources

Get the resources for a business application. The resource contains links to the instant, create single request job, and create multi request jobs resources.

The method returns a Resource Description document.

HTTP Request Methods

The resource can be accessed using the following HTTP request methods.

  • GET

URI Templates

The URI templates define the paths that can be appended to the base URL of the service to access this resource.

/ws/apps/{businessApplicationName}

URI Template Parameters

The URI templates support the following parameters which must be replaced with values as described below.

ParameterTypeDescription
{businessApplicationName}StringThe name of the business application.

HTTP Status Codes

The resource will return one of the following status codes. The HTML error page may include an error message. The descriptions of the messages and the cause are described below.

HTTP Status CodeDescription
200

The resource will be returned in the body of the HTTP response in the requested format.

403

If the user does not have permission for this resource on the business application.

404

If the business application does not exist, or is not enabled.

500

Internal Server Error

This error indicates that there was an unexpected error on the server. This is sometimes temporary so try again after a few minutes. The problem could also be caused by bad input data so verify all input parameters and files. If the problem persists contact the support desk with exact details of the parameters you were using.

Get Business Applications Single

Get the specification of the Create Job With Single Request service.

The method returns a Resource Description document with the following additional fields which are the parameters to the Create Job With Single Request service..

Business Application Single Request Fields
Attribute Description
description The description of services offered by the business application.
businessApplicationName The name of the business application.
businessApplicationTitle The display title of the business application.
businessApplicationDescription The description of services offered by the business application.
businessApplicationDescriptionUrl A link to a web page describing more details about the business application.
parameters

The array of parameters that can be passed to the service. Each parameter is an object containing the following fields.

Patameters
Attribute Description
name The case sensitive name of the parameter.
type The data type of the parameter.
description The description of the parameter.
descriptionUrl The link to a more detailed description of the parameter.
jobParameter Boolean flag indicating if the parameter can be specified globally on the job.
requestParameter Boolean flag indicating if the parameter can be specified on each request in the job.
inputDataContentTypes The array of MIME media types of input data accepted by the business application.
perRequestInputData Boolean flag indicating that the business application accepts opaque data (true) or structured data (false).
resultDataContentTypes The array of MIME media types of result data generated by the business application.
perRequestResultData Boolean flag indicating that the business application returns opaque data (true) or structured data (false).

HTTP Request Methods

The resource can be accessed using the following HTTP request methods.

  • GET

URI Templates

The URI templates define the paths that can be appended to the base URL of the service to access this resource.

/ws/apps/{businessApplicationName}/single

URI Template Parameters

The URI templates support the following parameters which must be replaced with values as described below.

ParameterTypeDescription
{businessApplicationName}StringThe name of the business application.

HTTP Status Codes

The resource will return one of the following status codes. The HTML error page may include an error message. The descriptions of the messages and the cause are described below.

HTTP Status CodeDescription
200

The resource will be returned in the body of the HTTP response in the requested format.

403

If the user does not have permission for this resource on the business application.

404

If the business application does not exist, or is not enabled.

500

Internal Server Error

This error indicates that there was an unexpected error on the server. This is sometimes temporary so try again after a few minutes. The problem could also be caused by bad input data so verify all input parameters and files. If the problem persists contact the support desk with exact details of the parameters you were using.

Get Jobs

Get the list of links to the Get Jobs Info resource for each of the user's jobs.

The method returns a Resource Description document. Each child resource supports following custom attributes.

Job Fields
Attribute Description
batchJobId The unique identifier of the job.
batchJobUrl The URL to the Get Jobs Info resource without the file format extension.
jobStatus The current status of the job.
creationTimestamp The time when the job was created.

HTTP Request Methods

The resource can be accessed using the following HTTP request methods.

  • GET

URI Templates

The URI templates define the paths that can be appended to the base URL of the service to access this resource.

/ws/jobs

HTTP Status Codes

The resource will return one of the following status codes. The HTML error page may include an error message. The descriptions of the messages and the cause are described below.

HTTP Status CodeDescription
200

The resource will be returned in the body of the HTTP response in the requested format.

500

Internal Server Error

This error indicates that there was an unexpected error on the server. This is sometimes temporary so try again after a few minutes. The problem could also be caused by bad input data so verify all input parameters and files. If the problem persists contact the support desk with exact details of the parameters you were using.

Get Jobs Info

Get the details of a job.

The method returns a BatchJob object with the following attributes.

Job Fields
Attribute Description
id The unique identifier of the job.
businessApplicationName The name of the business application.
<parameter> The the job parameters.
resultSrid The coordinate system code of the projection for the result geometry.
resultNumAxis The number of coordinate axis in the result geometry (e.g. 2 for 2D or 3 for 3D).
resultScaleFactorXy The scale factor to apply the x, y coordinates. The scale factor is 1 / minimum unit. For example if the minimum unit was 1mm (0.001) the scale factor is 1000 (1 / 0.001).
resultScaleFactorZ The scale factor to apply the z coordinate. The scale factor is 1 / minimum unit. For example if the minimum unit was 1mm (0.001) the scale factor is 1000 (1 / 0.001).
resultDataContentType The MIME type of the result data specified to be returned after running the request.
jobStatus The current status of the job.
secondsToWaitForStatusCheck The number of seconds to wait before checking the status again
numSubmittedRequests The number of requests submitted.
numCompletedRequests The number of requests that completed execution successfully.
numFailedRequests The number of requests that failed to execute.
resultsUrl

HTTP Request Methods

The resource can be accessed using the following HTTP request methods.

  • GET

URI Templates

The URI templates define the paths that can be appended to the base URL of the service to access this resource.

/ws/jobs/{batchJobId}

URI Template Parameters

The URI templates support the following parameters which must be replaced with values as described below.

ParameterTypeDescription
{batchJobId}LongThe unique identifier of the job.

HTTP Status Codes

The resource will return one of the following status codes. The HTML error page may include an error message. The descriptions of the messages and the cause are described below.

HTTP Status CodeDescription
200

The resource will be returned in the body of the HTTP response in the requested format.

500

Internal Server Error

This error indicates that there was an unexpected error on the server. This is sometimes temporary so try again after a few minutes. The problem could also be caused by bad input data so verify all input parameters and files. If the problem persists contact the support desk with exact details of the parameters you were using.

Get Jobs Result

Get the contents of a user's job result file. The content type will be the content type requested in the job.

HTTP Request Methods

The resource can be accessed using the following HTTP request methods.

  • GET
  • POST

URI Templates

The URI templates define the paths that can be appended to the base URL of the service to access this resource.

/ws/jobs/{batchJobId}/results/{resultId}

URI Template Parameters

The URI templates support the following parameters which must be replaced with values as described below.

ParameterTypeDescription
{batchJobId}LongThe unique identifier of the job.
{resultId}intThe unique identifier of the result file.

HTTP Status Codes

The resource will return one of the following status codes. The HTML error page may include an error message. The descriptions of the messages and the cause are described below.

HTTP Status CodeDescription
200

The resource will be returned in the body of the HTTP response.

500

Internal Server Error

This error indicates that there was an unexpected error on the server. This is sometimes temporary so try again after a few minutes. The problem could also be caused by bad input data so verify all input parameters and files. If the problem persists contact the support desk with exact details of the parameters you were using.

Get Jobs Results

Get the list of links to the Get Jobs Result resource for each of the results for a user's job.

The method returns a Resource Description document. Each child resource supports following custom attributes.

Result Fields
Attribute Description
batchJobResultType The type of result file structuredResultData, opaqueResultData, errorResultData.
batchJobResultContentType The MIME type of the result file.

HTTP Request Methods

The resource can be accessed using the following HTTP request methods.

  • GET

URI Templates

The URI templates define the paths that can be appended to the base URL of the service to access this resource.

/ws/jobs/{batchJobId}/results

URI Template Parameters

The URI templates support the following parameters which must be replaced with values as described below.

ParameterTypeDescription
{batchJobId}Long

HTTP Status Codes

The resource will return one of the following status codes. The HTML error page may include an error message. The descriptions of the messages and the cause are described below.

HTTP Status CodeDescription
200

The resource will be returned in the body of the HTTP response in the requested format.

500

Internal Server Error

This error indicates that there was an unexpected error on the server. This is sometimes temporary so try again after a few minutes. The problem could also be caused by bad input data so verify all input parameters and files. If the problem persists contact the support desk with exact details of the parameters you were using.

Get Root

Get the root resource of the CPF web services. The resource contains links to the Get Jobs and Get Business Applications resources.

The method returns a Resource Description document.

HTTP Request Methods

The resource can be accessed using the following HTTP request methods.

  • GET

URI Templates

The URI templates define the paths that can be appended to the base URL of the service to access this resource.

/ws

HTTP Status Codes

The resource will return one of the following status codes. The HTML error page may include an error message. The descriptions of the messages and the cause are described below.

HTTP Status CodeDescription
200

The resource will be returned in the body of the HTTP response in the requested format.

500

Internal Server Error

This error indicates that there was an unexpected error on the server. This is sometimes temporary so try again after a few minutes. The problem could also be caused by bad input data so verify all input parameters and files. If the problem persists contact the support desk with exact details of the parameters you were using.