Authentication with an API Key - ABO

Back Office Integration Guide

Product
ABO
AFS_Version
7.9
Category
Reference Guides
language
English

Authentication can be made by an API key.

Only root users can generate API key.

Using an API key is a solution to make sure the login and password are not in plain text.

The API key has an infinite lifetime. As long as it is not regenerated, it remains valid.

Get an API Key

  1. In the Back Office, click on the user name in the top right corner.

    The User Name button gives access to the user settings

    The User settings panel is displayed.

  2. Click on GENERATE AN API KEY.

    The User Settings interface offers to generate an API Key

    The generated API key is displayed right above the button.

    The generated API Key is displayd above the button

The user API key can be used to configure the authentication to the Back Office.

These lines show an example of an API key use with CURL:

curl
-X POST
-H "api-key-token: $APIKEY"
--form file="@$FILE"
"http://$HOST/bo-ws/service/$SERVICE_ID/instance/$SERVICE_STATUS/paf/$PAF_NAME/upload?afs:type=$MODE"

Where:

  • $APIKEY is the API Key generated from the Back Office portal.
  • $FILE is the file to be uploaded.
  • $HOST is the Back-Office host.
  • $SERVICE_ID is the Service ID.
  • $SERVICE_STATUS is the Service status.
  • $PAF_NAME is the PaF name.
  • $MODE is the processing mode (INCR (default), FULL or URGENT_FULL).

When using Python scripts, it is necessary to declare the API key in the conf.xml configuration file located in /usr/local/afs7/conf/ by adding the following lines in the <afs:conf> element:

<afs:BO>
<afs:Server>
<afs:apiKey value="$APIKEY"/>
</afs:Server>
</afs:BO>