Upload Data to a PaF - ABO

Back Office Integration Guide

Product
ABO
AFS_Version
7.9
Category
Reference Guides
language
English

This API allows users to send data to process to a PaF. The PaF must be data-driven, see Data-driven for more information.

This PaF is automatically launched if it is installed in autostart mode. It has to be manually launched if it is installed in manual start mode.

See also:

  • the PaF manager section of AFS Configuration Guide for more information about installing PaF
  • Launch PaF API to launch a manual start PaF

An "Upload Data to a PaF" API request takes the following form:

curl -H Expect: --form file1="@/home/user_name/my_file_to_process.zip" --form file2="@/home/user_name/my_other_file_to_process.zip" "https://$HOST/bo-ws/service/$SERVICE_ID/instance/$SERVICE_STATUS/paf/$PAF_NAME/upload?afs:login=login://$USER:$PASSWORD@$AUTHENTICATION_AUTHORITY&afs:comment=$MY_COMMENT&afs:type=$UPLOAD_TYPE"&afs:priority=LOW|REGULAR|HIGH

Method

POST

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

Parameter

Description

file1, file2, ...

Files to upload

$HOST

The server hosting the Back Office

$SERVICE_ID

The number of the desired service

$SERVICE_STATUS

The status of the desired service

$PAF_NAME

The name of the PaF

$MY_COMMENT

The optional comment to set to this upload

$UPLOAD_TYPE

The type of the upload: incremental (or incr), full, or urgent_full (optional, defaults to incremental)

afs:priority

The priority level of the upload: LOW, REGULAR (default), or HIGH.

afs:pafParams

Optional

It expects the following JSON string:

{
"search_build_params": {"processing_type": "full|incr"}
"doc_index_params": {"processing_type": "full|incr"}
}

Where:

  • search_build_params applies to the afs_search_build filter.
  • doc_index_params applies to the afs_doc_index filter.
  • "processing_type"="full|incr" defines if the upload must behave as a full or incremental upload.

When setting an afs:priority, the PaF Manager configuration requires adjustments.
See afs:priority Requirements.

Return Example

Return contains UUID, JobID and started attributes.

<?xml version="1.0" standalone='yes'?>
<afs:value xsi:schemaLocation="http://ref.antidot.net/v7/bo/output http://ref.antidot.net/v7.4/bo/output.xsd"
xsi:type="afs:ws.response"
xmlns:afs="http://ref.antidot.net/v7/bo/output"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<afs:query xsi:type="afs:ws.response.query">
<afs:locale>*</afs:locale>
<afs:parameters></afs:parameters>
<afs:properties xsi:type="afs:dynamic"></afs:properties>
</afs:query>
<afs:result xsi:type="afs:PushPafContentReply">
<afs:jobId>186</afs:jobId>
<afs:started>true</afs:started>
<afs:uuid>80385fe4-5d16-4183-816c-427eb9d890ec</afs:uuid>
</afs:result>
</afs:value>

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