Skip to main content
POST
/
products
/
{product_id}
/
spec-details
/
graphql
/
schema
Upload GraphQL SDL for Documentation Product
curl --request POST \
  --url http://localhost:3001/portal-api/products/{product_id}/spec-details/graphql/schema \
  --header 'Content-Type: multipart/form-data' \
  --form file=@example-file
{
  "CID": "2r7p8aUnkzby17hCJk8w2XvK3K6",
  "SpecAlias": "payment_api",
  "OASUrl": "https://petstore.swagger.io/v2/swagger.json",
  "Name": "Payment API Documentation"
}

Path Parameters

product_id
integer
required

UID of a documentation-only product

Query Parameters

dry_run
boolean
default:false

If true, only validates the file without saving it

Body

multipart/form-data
file
file

GraphQL SDL file to upload (.graphql, .gql, or .json) - only 1 file at a time

Response

GraphQL schema uploaded and spec created

SpecAlias
string
required

Alias/identifier for this Specification

Example:

"payment_api"

CID
string

Client ID associated with this Specification

Example:

"2r7p8aUnkzby17hCJk8w2XvK3K6"

OASUrl
string

URL of OpenAPI Specification. The document must be a valid OAS document

Example:

"https://petstore.swagger.io/v2/swagger.json"

Name
string

Name of the Specification

Example:

"Payment API Documentation"