ThreatX API Reference for Administrators
Introduction
The ThreatX platform uses a RESTful API and supports a full set of application capabilities that can be used ad-hoc, in scripts, and in automation tool sets. Common uses include creating and managing user accounts, provisioning new sites to be protected, and managing certificates.
To access the ThreatX API, you must know your tenant name and you must have an API key to authenticate and create a session token. See Generating and revoking API keys |
For details about the API endpoints and commands, see the API Reference Guide (requires a ThreatX account to access). |
Login
The api_key, created within the ThreatX user interface ( api_token
parameter. The response then provides a unique and temporary access_token
string to be used in further endpoint commands.
Parameters | Type |
---|---|
|
String |
|
String |
$ curl {url-txapi}/login \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"command": "login",
"api_token": "<api_key>"
}
EOF
{
"Ok": {
"status": true,
"token": "<access_token>"
}
}
List Customers
Parameters | Type |
---|---|
|
String |
|
String |
$ curl {url-txapi}/customers \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"command": "list",
"token": "<access_token>"
}
EOF
Replace <access_token>
with your access token from the last command.
{
"Ok": [
{
"name": "testco",
"contact_email": "alice@testco.com",
"description": "Tesco tenant",
"active": true,
"autoblock_threshold": 70,
"autoblock_timeout": 3600,
"block_embargo": true,
"ssl_ciphers": null,
"notify_threshold": 100,
"sso": null,
"allow_super_admin_users": true,
"allow_channel_admin_users": true,
"tenant_admin_default": null,
"uuid": "<tenant_uuid>"
}
]
}
Update Customer
The SSO object is used to configure the SSO parameters. All other parameters to the customer object should not be modified when configuring SSO.
Parameters | Type |
---|---|
|
String |
|
String |
|
String |
|
CustomerObject |
Parameters | Type |
---|---|
|
String |
|
String |
|
String |
|
Boolean |
|
Integer |
|
Integer |
|
SSO Object |
Parameters | Type | Description |
---|---|---|
|
Boolean |
When true, users belonging to the tenant are allowed to sign in to the ThreatX user interface using SSO. |
|
Boolean |
When true, users are required to use SSO to sign in to the ThreatX user interface. |
|
String |
IDP metadata URL or file. See the Prerequisites. |
$ curl {url-txapi}/customers \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"command": "update",
"token": "<login_token>",
"name": "testco",
"customer": {
"name": "testco",
"contact_email": "alice@testco.com",
"description": "Testco tenant",
"active": true,
"autoblock_threshold": 70,
"autoblock_timeout": 3600,
"block_embargo": true,
"ssl_ciphers": null,
"notify_threshold": 100,
"allow_super_admin_users": true,
"allow_channel_admin_users": true,
"tenant_admin_default": null,
"sso": {
"enabled": true,
"required": false,
"saml_metadata_url": "https://login.microsoftonline.com/daad3805-fde6-4334-817f-82c723533123/federationmetadata/2007-06/federationmetadata.xml"
}
}
}
EOF
{ "Ok": "testco updated." }
List Channels
Parameters | Type |
---|---|
|
String |
|
String |
$ curl {url-txapi}/channels \
-H 'Content-Type: application/json' \
--data @- <<EOF
{
"command": "list",
"token":" "<access_token>"
}
EOF
{
"Ok": [
{
"name": "test_channel",
"require_totp_setup": null,
"uuid": "81815E73-ABB9-4533-977B-93964B8AAB73",
"sso": null
}
]
}
Update Channels
The update
command updates a specified channel.
|
Type |
|
String |
|
String |
|
Parameter | Type |
---|---|
|
String |
|
Name | Type | Description |
---|---|---|
|
Boolean |
When true, users belonging to the channel are allowed to sign in to the ThreatX user interface using SSO. |
|
Boolean |
When true, users in the channel are required to use SSO to sign in to the ThreatX user interface. |
|
String |
IDP metadata URL or file. See the Prerequisites. |
$ curl {url-txapi}/channels \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"command": "update",
"token": "<login_token>",
"channel": {
"name": "test_channel",
"sso": {
"enabled": true,
"required": false,
"saml_metadata_url": "https://login.microsoftonline.com/daad3805-fde6-4334-817f-82c723533123/federationmetadata/2007-06/federationmetadata.xml"
}
}
}
EOF
{"Ok": "Channel: test_channel updated."}