Launch PaF - ABO

Back Office Integration Guide

Product
ABO
AFS_Version
7.9
Category
Reference Guide
language
English

This API allows to run a PaF process. It is also possible to override PaF start options.

A "Launch PaF" API request with default start options takes the following form:

curl -H Expect: -H "Content-Type: application/json" --data "" "http://$HOST/bo-ws/service/$SERVICE_ID/instance/$SERVICE_STATUS/paf/$PAF_NAME/run?afs:login=login://$USER:$PASSWORD@$AUTHENTICATION_AUTHORITY&afs:priority=LOW|REGULAR|HIGH"

Content type of data after --data must be specified as JSON.

The data parameter works even when empty (without specifying the header), which means that if there is no mode (by default, incremental mode) nor input, e.g., because data is sent through the upload web service, the following example is correct:

curl -H Expect: -H "Content-Type: application/json" --data "" "https:// ..."

The PaF is then launched with its default options, as configured in the following START OPTIONS in the PaF Header:

Screen Shot 2016-02-04 at 15.54.01

A "Launch PaF" API request with override of start options takes the following form:

curl -H Expect: -H "Content-Type: application/json" --data "{\"afs:t\":\"bows.paf.option\",\"actived\":true,\"secured\":false,\"warehouse\":false,\"mode\":\"REPLACE\",\"input\":[{\"afs:t\":\"bows.paf.option.input.uri\",\"value\":\"www.antidot.net\"},{\"afs:t\":\"bows.paf.option.input.uri\",\"value\":\"www.google.com\"},{\"afs:t\":\"bows.paf.option.input.directory\",\"value\":\"dir1\",\"suffix\":\"xml\"},{\"afs:t\":\"bows.paf.option.input.directory\",\"value\":\"dir2\",\"suffix\":\"pdf\"},{\"afs:t\":\"bows.paf.option.input.seedfile\",\"value\":\"file1\"},{\"afs:t\":\"bows.paf.option.input.seedfile\",\"value\":\"file2\"}]}" "http://<host>/bo-ws/service/<service_id>/instance/<instance_status>/paf/<paf_name>/run?afs:login=login://<user>:<password>@<authentication_authority>"

Hereafter, more details about the post data:

{
"afs:t": "bows.paf.option",
"actived": true, // Always set to true
"secured": false, // -s option of afs_paf, optional
"warehouse": false, // -w option of afs_paf, optional

"input": [ // Input data to process. Optional, but must be set (even if empty).
{
"afs:t": "bows.paf.option.input.uri", // URI input type (-i option of afs_paf)
"value": "www.antidot.net" // URI input value
},
{
"afs:t": "bows.paf.option.input.uri", // second input URI type (unlimited)
"value": "www.google.com"
},
{
"afs:t": "bows.paf.option.input.seedfile", // seed file input type (-f option of afs_paf)
"value": "file1" // seed file input value
},
{
"afs:t": "bows.paf.option.input.seedfile", // second seed file input type (unlimited)
"value": "file2"
},
{
"afs:t": "bows.paf.option.input.directory", // Directory input type (-I option of afs_paf)
"value": "dir1",
"suffix": "xml"
},
{
"afs:t": "bows.paf.option.input.directory", // second directory input type (unlimited)
"value": "dir2",
"suffix": "pdf"
}
]
}

Method

POST

The list of parameters and their possible values are enumerated below.

  • $HOST is the server hosting the Back Office.
  • $SERVICE_ID is the ID of the desired service.
  • $SERVICE_STATUS is the status of the desired service.
  • $PAF_NAME is the name of the PaF.
  • afs:priority is the priority level of the upload: LOW, REGULAR (default), or HIGH.
  • $USER and $PASSWORD are the credentials of the user calling the web service.
  • afs:login=login://$USER:$PASSWORD@$AUTHENTICATION_AUTHORITY is the authentication part.
  • $AUTHENTICATION_AUTHORITY is the Authentication Authority (such as LDAP) and supports the following values:
    • LDAP: if the BO is connected to an LDAP, user is authenticated thanks to this LDAP.
    • BOWS: if the BO is using its own internal users database.
    • SSO: at first user authentication, an SSO token is sent back. It can be then used for the next API requests.
    • Antidot: this authentication mode is used only for the Back Office antidot root user.

This way of authentication may be harmful because the user password is not completely secure and could be retrieved. When using the API in production, another authentication mechanism should be preferred.

CURL is used for these examples. Any other HTTP client can be used.