Skip to main content
POST
/
waap
/
v1
/
domains
/
{domain_id}
/
api-paths
Python
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
waap_api_path = client.waap.domains.api_paths.create(
    domain_id=1,
    http_scheme="HTTP",
    method="GET",
    path="/api/v1/paths/{path_id}",
)
print(waap_api_path.id)
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "path": "<string>",
  "method": "GET",
  "api_version": "<string>",
  "http_scheme": "HTTP",
  "first_detected": "2023-11-07T05:31:56Z",
  "last_detected": "2023-11-07T05:31:56Z",
  "tags": [
    "<string>"
  ],
  "api_groups": [
    "<string>"
  ],
  "status": "CONFIRMED_API",
  "source": "API_DESCRIPTION_FILE",
  "request_count": 123
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

domain_id
integer
required

The domain ID The domain ID

Body

application/json

Request model for creating an API path

path
string
required

The API path, locations that are saved for resource IDs will be put in curly brackets

Maximum string length: 1024
method
enum<string>
required

The different methods an API path can have

Available options:
GET,
POST,
PUT,
PATCH,
DELETE,
TRACE,
HEAD,
OPTIONS
http_scheme
enum<string>
required

The different HTTP schemes an API path can have

Available options:
HTTP,
HTTPS
api_version
string
Maximum string length: 32
tags
string[]
Maximum array length: 5

A user defined tag. Tags must start with a letter and can contain only letters, numbers and spaces.

Maximum string length: 50
api_groups
string[]

Response

Successful Response

Response model for the API path

id
string<uuid>
required

The path ID

path
string
required

The API path, locations that are saved for resource IDs will be put in curly brackets

Maximum string length: 1024
method
enum<string>
required

The API RESTful method

Available options:
GET,
POST,
PUT,
PATCH,
DELETE,
TRACE,
HEAD,
OPTIONS
api_version
string
required

The API version

Maximum string length: 32
http_scheme
enum<string>
required

The HTTP version of the API path

Available options:
HTTP,
HTTPS
first_detected
string<date-time>
required

The date and time in ISO 8601 format the API path was first detected.

last_detected
string<date-time>
required

The date and time in ISO 8601 format the API path was last detected.

tags
string[]
required

An array of tags associated with the API path

Maximum array length: 5

A user defined tag. Tags must start with a letter and can contain only letters, numbers and spaces.

Maximum string length: 50
api_groups
string[]
required

An array of api groups associated with the API path

status
enum<string>
required

The status of the discovered API path

Available options:
CONFIRMED_API,
POTENTIAL_API,
NOT_API,
DELISTED_API
source
enum<string>
required

The source of the discovered API

Available options:
API_DESCRIPTION_FILE,
TRAFFIC_SCAN,
USER_DEFINED
request_count
integer
required

The number of requests for this path in the last 24 hours