SAML
Configuration
curl
curl -X GET "https://appliance.example.com/api/v1/saml/config" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/saml/config';
$headers = [
'Authorization: Bearer ' . $token,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => $headers,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests
headers = {"Authorization": f"Bearer {token}"}
response = requests.get("https://appliance.example.com/api/v1/saml/config", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/saml/config', {
method: 'GET',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Response
{
"status": "success",
"message": "SAML configuration",
"data": []
}
curl
curl -X PUT "https://appliance.example.com/api/v1/saml/config" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/saml/config';
$headers = [
'Authorization: Bearer ' . $token,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => $headers,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests
headers = {"Authorization": f"Bearer {token}"}
response = requests.put("https://appliance.example.com/api/v1/saml/config", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/saml/config', {
method: 'PUT',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Response
{
"status": "success",
"message": "SAML configuration updated",
"data": []
}
Ingest SAML metadata
curl
curl -X POST "https://appliance.example.com/api/v1/saml/config/metadata" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/saml/config/metadata';
$headers = [
'Authorization: Bearer ' . $token,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => $headers,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests
headers = {"Authorization": f"Bearer {token}"}
response = requests.post("https://appliance.example.com/api/v1/saml/config/metadata", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/saml/config/metadata', {
method: 'POST',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Response
{
"status": "success",
"message": "Identity-provider metadata parsed",
"data": []
}
Get the SAML service provider metadata
curl
curl -X GET "https://appliance.example.com/api/v1/saml/metadata" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/saml/metadata';
$headers = [
'Authorization: Bearer ' . $token,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => $headers,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests
headers = {"Authorization": f"Bearer {token}"}
response = requests.get("https://appliance.example.com/api/v1/saml/metadata", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/saml/metadata', {
method: 'GET',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Response
{
"status": "success",
"message": "Service-provider metadata",
"data": []
}
Rotate the SCIM bearer token
curl
curl -X POST "https://appliance.example.com/api/v1/saml/scim/token" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/saml/scim/token';
$headers = [
'Authorization: Bearer ' . $token,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => $headers,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests
headers = {"Authorization": f"Bearer {token}"}
response = requests.post("https://appliance.example.com/api/v1/saml/scim/token", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/saml/scim/token', {
method: 'POST',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Response
{
"status": "success",
"message": "SCIM bearer token generated — copy it now; it will not be shown again",
"data": {
"token": "<token>"
}
}