from gcore import Gcore
client = Gcore(
api_key="My API Key",
)
api_path = client.waap.domains.api_paths.create(
domain_id=1,
http_scheme="HTTP",
method="GET",
path="/api/v1/paths/{path_id}",
)
print(api_path.id)
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "/api/v1/paths/{path_id}",
"method": "GET",
"api_version": "v1",
"http_scheme": "HTTP",
"first_detected": "2023-11-07T05:31:56Z",
"last_detected": "2023-11-07T05:31:56Z",
"tags": [
"sensitivedataurl",
"highriskurl"
],
"api_groups": [
"accounts",
"internal"
],
"status": "CONFIRMED_API",
"source": "API_DESCRIPTION_FILE",
"request_count": 123
}
Create an API path for a domain
from gcore import Gcore
client = Gcore(
api_key="My API Key",
)
api_path = client.waap.domains.api_paths.create(
domain_id=1,
http_scheme="HTTP",
method="GET",
path="/api/v1/paths/{path_id}",
)
print(api_path.id)
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "/api/v1/paths/{path_id}",
"method": "GET",
"api_version": "v1",
"http_scheme": "HTTP",
"first_detected": "2023-11-07T05:31:56Z",
"last_detected": "2023-11-07T05:31:56Z",
"tags": [
"sensitivedataurl",
"highriskurl"
],
"api_groups": [
"accounts",
"internal"
],
"status": "CONFIRMED_API",
"source": "API_DESCRIPTION_FILE",
"request_count": 123
}
API key for authentication. Make sure to include the word apikey
, followed by a single space and then your token.
Example: apikey 1234$abcdef
The domain ID
x > 0
Request model for creating an API path
Successful Response
Response model for the API path
Was this page helpful?