Authentication can be made by an API key.
Using an API key is a solution to make sure the login and password are not in plain text.
Get an API Key
- In the Back Office, click on the user name in the top right corner.
The User settings panel is displayed.
- Click on GENERATE AN API KEY.
The generated API key is displayed right 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:
-H "api-key-token: $APIKEY"
- $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: