Set a domain's scan login
curl --request PUT \
--url https://app.ilitylabs.com/v1/domains/{slug}/scan-auth \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>",
"password": "<string>",
"login_url": "<string>",
"username_selector": "<string>",
"password_selector": "<string>",
"submit_selector": "<string>",
"logged_in_selector": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
username: '<string>',
password: '<string>',
login_url: '<string>',
username_selector: '<string>',
password_selector: '<string>',
submit_selector: '<string>',
logged_in_selector: '<string>'
})
};
fetch('https://app.ilitylabs.com/v1/domains/{slug}/scan-auth', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.ilitylabs.com/v1/domains/{slug}/scan-auth"
payload = {
"username": "<string>",
"password": "<string>",
"login_url": "<string>",
"username_selector": "<string>",
"password_selector": "<string>",
"submit_selector": "<string>",
"logged_in_selector": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"available": true,
"configured": true,
"method": "basic",
"username": "<string>",
"has_password": true,
"login_url": "<string>",
"username_selector": "<string>",
"password_selector": "<string>",
"submit_selector": "<string>",
"logged_in_selector": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>",
"reason": "<string>"
}{
"detail": "<string>",
"reason": "<string>"
}{
"detail": "<string>",
"reason": "<string>"
}{
"detail": "<string>",
"reason": "<string>"
}Domains
Set a domain's scan login
Creates or replaces the domain’s scan login. Use basic for HTTP basic auth, on every plan, or form to sign in through a login form, which needs the true_user_auth entitlement (Pro and Enterprise). A form login needs a login_url on the domain’s site and a logged_in_selector. password is required the first time; omit it later to keep the stored one. Returns 403 for a viewer or for form without the entitlement, 400 for an off-site login URL or a missing logged-in check, and 503 when scan logins aren’t available on this deployment.
PUT
/
v1
/
domains
/
{slug}
/
scan-auth
Set a domain's scan login
curl --request PUT \
--url https://app.ilitylabs.com/v1/domains/{slug}/scan-auth \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>",
"password": "<string>",
"login_url": "<string>",
"username_selector": "<string>",
"password_selector": "<string>",
"submit_selector": "<string>",
"logged_in_selector": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
username: '<string>',
password: '<string>',
login_url: '<string>',
username_selector: '<string>',
password_selector: '<string>',
submit_selector: '<string>',
logged_in_selector: '<string>'
})
};
fetch('https://app.ilitylabs.com/v1/domains/{slug}/scan-auth', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.ilitylabs.com/v1/domains/{slug}/scan-auth"
payload = {
"username": "<string>",
"password": "<string>",
"login_url": "<string>",
"username_selector": "<string>",
"password_selector": "<string>",
"submit_selector": "<string>",
"logged_in_selector": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"available": true,
"configured": true,
"method": "basic",
"username": "<string>",
"has_password": true,
"login_url": "<string>",
"username_selector": "<string>",
"password_selector": "<string>",
"submit_selector": "<string>",
"logged_in_selector": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>",
"reason": "<string>"
}{
"detail": "<string>",
"reason": "<string>"
}{
"detail": "<string>",
"reason": "<string>"
}{
"detail": "<string>",
"reason": "<string>"
}Authorizations
Body
application/json
Response
OK