POST
/
organisations
/
{organisationId}
/
schemas
curl --request POST \
  --url https://api.switchboard.svc.versori.io/v1alpha1/organisations/{organisationId}/schemas \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "<string>",
  "type": "<string>",
  "async": true
}'
{
  "id": "<string>",
  "type": "<string>",
  "version": "<string>",
  "sourceUrl": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "deletedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

organisationId
string
required

Body

application/json
url
string
required

URL is the address where the schema file is hosted. This may be an externally accessible http(s):// URL, or a gs:// URL which Switchboard is granted access to.

type
string
required

Type is the schema type being created. The only type currently supported is "openapi".

async
boolean

Async is a flag to indicate whether the schema should be created asynchronously. This will result in a 201 Accepted response for which the response body will be different to the regular synchronous response.

Response

200 - application/json
id
string
required
type
string
required

Type denotes the type of schema the corresponding App is backed by. Currently the only supported value is "openapi", but other types such as "soap", "graphql" and "grpc" are on the roadmap.

version
string
required

Version denotes the version of the schema specification. This property is contextual based on the schema type, for example openapi schemas will contain the OpenAPI specification version (currently only 3.0.x is supported), but grpc APIs could be "proto2" or "proto3".

sourceUrl
string
required

URL is the private address for accessing the schema. This is not guaranteed to be publicly accessible and could be a non-HTTP protocol (i.e. gs:// or s3://)

createdAt
string
required
updatedAt
string
required
deletedAt
string