POST
/
waap
/
v1
/
domains
/
{domain_id}
/
api-discovery
/
upload
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
)
response = client.waap.domains.api_discovery.upload_openapi(
    domain_id=0,
    file_data="file_data",
    file_name="file_name",
)
print(response.id)
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

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

Body

application/json

Request model for uploading an API spec file

file_name
string
required

The name of the file

file_data
string
required

Base64 representation of the description file. Supported formats are YAML and JSON, and it must adhere to OpenAPI versions 2, 3, or 3.1.

Response

Successful Response

Response model for the task result ID

id
string<uuid>
required

The task ID