Update the API discovery settings
Project-scoped operation. Requires the api_security add-on. Successful JSON and status-only responses vary by operation. The service does not declare a stable response schema for this operation; do not assume a collection envelope or undocumented fields.
PATCH
/
shield
/
domains
/
{domain_id}
/
api-discovery
/
settings
Update the API discovery settings
curl --request PATCH \
--url https://api.aptranet.com/shield/domains/{domain_id}/api-discovery/settings \
--header 'Aptranet-Secret: <api-key>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"descriptionFileLocation": "<string>",
"descriptionFileScanEnabled": true,
"descriptionFileScanIntervalHours": 12,
"trafficScanEnabled": true,
"trafficScanIntervalHours": 12
}
'import requests
url = "https://api.aptranet.com/shield/domains/{domain_id}/api-discovery/settings"
payload = {
"descriptionFileLocation": "<string>",
"descriptionFileScanEnabled": True,
"descriptionFileScanIntervalHours": 12,
"trafficScanEnabled": True,
"trafficScanIntervalHours": 12
}
headers = {
"Authorization": "Bearer <token>",
"Aptranet-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Aptranet-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
descriptionFileLocation: '<string>',
descriptionFileScanEnabled: true,
descriptionFileScanIntervalHours: 12,
trafficScanEnabled: true,
trafficScanIntervalHours: 12
})
};
fetch('https://api.aptranet.com/shield/domains/{domain_id}/api-discovery/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aptranet.com/shield/domains/{domain_id}/api-discovery/settings"
payload := strings.NewReader("{\n \"descriptionFileLocation\": \"<string>\",\n \"descriptionFileScanEnabled\": true,\n \"descriptionFileScanIntervalHours\": 12,\n \"trafficScanEnabled\": true,\n \"trafficScanIntervalHours\": 12\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Aptranet-Secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": "<string>",
"error_description": "<string>"
}Authorizations
Project API access key.
Current secret for the access key.
Path Parameters
Body
application/json
Response
Successful response.
Update the API discovery settings
curl --request PATCH \
--url https://api.aptranet.com/shield/domains/{domain_id}/api-discovery/settings \
--header 'Aptranet-Secret: <api-key>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"descriptionFileLocation": "<string>",
"descriptionFileScanEnabled": true,
"descriptionFileScanIntervalHours": 12,
"trafficScanEnabled": true,
"trafficScanIntervalHours": 12
}
'import requests
url = "https://api.aptranet.com/shield/domains/{domain_id}/api-discovery/settings"
payload = {
"descriptionFileLocation": "<string>",
"descriptionFileScanEnabled": True,
"descriptionFileScanIntervalHours": 12,
"trafficScanEnabled": True,
"trafficScanIntervalHours": 12
}
headers = {
"Authorization": "Bearer <token>",
"Aptranet-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Aptranet-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
descriptionFileLocation: '<string>',
descriptionFileScanEnabled: true,
descriptionFileScanIntervalHours: 12,
trafficScanEnabled: true,
trafficScanIntervalHours: 12
})
};
fetch('https://api.aptranet.com/shield/domains/{domain_id}/api-discovery/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aptranet.com/shield/domains/{domain_id}/api-discovery/settings"
payload := strings.NewReader("{\n \"descriptionFileLocation\": \"<string>\",\n \"descriptionFileScanEnabled\": true,\n \"descriptionFileScanIntervalHours\": 12,\n \"trafficScanEnabled\": true,\n \"trafficScanIntervalHours\": 12\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Aptranet-Secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": "<string>",
"error_description": "<string>"
}