EULA API — Spectra Analyze
This API allows users to manage a custom End User License Agreement (EULA) on the appliance. A single custom EULA PDF can be stored at a time.
When a custom EULA is uploaded, the EULA links on the login page and in the application footer open the uploaded PDF. When the custom EULA is removed, those links revert to the default ReversingLabs EULA.
Uploading or removing a custom EULA restarts and reconfigures the appliance. During this time, the appliance is temporarily unavailable.
Download the current EULA
This API returns the current EULA PDF. If a custom PDF has been uploaded, that file is returned; otherwise the default ReversingLabs EULA PDF is returned.
GET api/system/config/eula/
An authentication token is not required for requests to this API.
Request Format
Request example
cURL
# Add --insecure before the URL if you are using a self-signed SSL certificate
curl -X 'GET' \
'http://api.example.com/api/system/config/eula/' \
-OJ
Python
import requests
# Change the value of the URL
url = "http://api.example.com/api/system/config/eula/"
# Add verify=False in the request if you are using a self-signed SSL certificate
response = requests.get(url, verify=False)
with open("eula.pdf", "wb") as eula_file:
eula_file.write(response.content)
Response Format
The response returns the EULA PDF file, using the file name provided by the server. If a custom EULA has been uploaded, that file is returned; otherwise the default ReversingLabs EULA PDF is returned.
Response Status Codes
| CODE | DESCRIPTION |
|---|---|
| 200 | OK |
| 404 | Default EULA file not found. The response body contains an error message. |
Upload or replace the EULA
This API uploads a custom EULA PDF and overwrites any existing one.
POST api/system/config/eula/
Request Format
Request Parameters
| NAME | REQUIRED | DESCRIPTION | TYPE |
|---|---|---|---|
| file | Required | The custom EULA PDF file to upload. | multipart/form-data |
Request example
cURL
# Add --insecure before the URL if you are using a self-signed SSL certificate
curl -X 'POST' \
'http://api.example.com/api/system/config/eula/' \
-H 'Authorization: Token <token-here>' \
-F 'file=@/path/to/eula.pdf'
Python
import requests
# Change the values of the URL, headers, and file path
url = "http://api.example.com/api/system/config/eula/"
headers = {
"Authorization": f"Token <token-here>"
}
files = {
"file": open("/path/to/eula.pdf", "rb")
}
# Add verify=False in the request if you are using a self-signed SSL certificate
response = requests.post(url, headers=headers, files=files, verify=False)
print(response.status_code)
print(response.text)
Response Format
The response returns a JSON body with a message field on success, or an error field on failure.
Response Status Codes
| CODE | DESCRIPTION |
|---|---|
| 200 | Upload successful. The response body contains a message field. |
| 400 | Bad Request. The response body contains an error field. |
| 500 | Server error. The response body contains an error field. |
Delete the EULA
This API removes the stored custom EULA PDF. After removal, the EULA links revert to the default ReversingLabs EULA.
DELETE api/system/config/eula/
Request Format
Request example
cURL
# Add --insecure before the URL if you are using a self-signed SSL certificate
curl -X 'DELETE' \
'http://api.example.com/api/system/config/eula/' \
-H 'Authorization: Token <token-here>'
Python
import requests
# Change the values of the URL and headers
url = "http://api.example.com/api/system/config/eula/"
headers = {
"Authorization": f"Token <token-here>"
}
# Add verify=False in the request if you are using a self-signed SSL certificate
response = requests.delete(url, headers=headers, verify=False)
print(response.status_code)
print(response.text)
Response Format
The response returns a JSON body with a message field on success, or an error field on failure.
Response Status Codes
| CODE | DESCRIPTION |
|---|---|
| 200 | Delete successful. The response body contains a message field. |
| 404 | No custom EULA PDF found. The response body contains an error field. |