ACP Upload and Publish - ABO

Back Office Integration Guide

Product
ABO
AFS_Version
7.9
Category
Reference Guides
language
English

This API allows to update the content of an ACP and publish it. The ACP can be generated for example at the end of a PaF process. For more information, see ACP Application chapter of the AFS Back Office User Guide.

An "ACP upload" API request takes the following form:

curl -H Expect: --form file="@/usr/local/afs7/PaF/<PaF_name>/acp/<foobar>:acp.xml;type=text/xml" "http://<host>/bo-ws/service/${Service_Number}/instance/<instance_status>/acp/<ACP_filename>/content?afs:login=login://<user>:<password>@<authentication_authority>"

Method: POST

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

  • host is the server hosting the Back Office.
  • service_number is the number of the desired service.
  • instance_status is the status of the desired service.
  • ACP_filename is the name of the ACP file.
  • In this example, /usr/local/afs7/PaF/<PaF_name>/acp/<foobar>:acp.xml is the ACP file to be sent to the Back Office. It can be located anywhere. The afs_acp_extract filter can be used to generate ACP files. See the corresponding topic of the AFS v7.9 Configuration Guide for more information about this filter.

Use POST method the first time in order to create the ACP. Note that in this case, request URL is:
http://<host>/bo-ws/service/${Service_Number}/instance/<instance_status>/acp
If the ACP already exists, use PUT method in order to edit it.
A GET request on the POST URL gives the list of existing ACP for the instance, including associated <ACP_filename>.

An "ACP publish" API request takes the following form:

curl -H Expect: -H "Content-Type:application/json" --request PUT --data "{\"x:reference\":\"/bo-ws/service/${Service_Number}/instance/<instance_status>/acp/<ACP_filename>\"}" "http://<host>/bo-ws/service/${Service_Number}/instance/<instance_status>/publish/acp/<ACP_filename>?afs:login=login://<user>:<password>@<authentication_authority>"

Method: PUT

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

  • host is the server hosting the Back Office.
  • service_number is the number of the desired service.
  • instance_status is the status of the desired service.
  • ACP_filename is the name of the ACP file.

Use POST method the first time in order to publish the first version of the ACP. Note that in this case, request URL is:
http://<host>/bo-ws/service/${Service_Number}/instance/<instance_status>/publish/acp
If the ACP already exists, use PUT method in order to publish it again.
A GET request on the POST URL gives the list of existing published ACP for the instance, including associated <ACP_filename>.

In order to create the desired directory arborescence on the reply server, the binary afs_service_install can be used.

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