(schemas)
REST APIs for managing Schema entities
- deleteSchema - Delete a particular schema revision for an Api.
- downloadSchema - Download the latest schema for a particular apiID.
- downloadSchemaRevision - Download a particular schema revision for an Api.
- getSchema - Get information about the latest schema.
- getSchemaDiff - Get a diff of two schema revisions for an Api.
- getSchemaRevision - Get information about a particular schema revision for an Api.
- getSchemas - Get information about all schemas associated with a particular apiID.
- registerSchema - Register a schema.
Delete a particular schema revision for an Api.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
import { DeleteSchemaResponse } from "@speakeasy-api/speakeasy-client-sdk-typescript/dist/sdk/models/operations";
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
sdk.schemas.deleteSchema({
apiID: "Hybrid",
revisionID: "Funk Garden Specialist",
versionID: "male",
}).then((res: DeleteSchemaResponse) => {
if (res.statusCode == 200) {
// handle response
}
});
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.DeleteSchemaRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.DeleteSchemaResponse>
Download the latest schema for a particular apiID.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
import { DownloadSchemaResponse } from "@speakeasy-api/speakeasy-client-sdk-typescript/dist/sdk/models/operations";
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
sdk.schemas.downloadSchema({
apiID: "Specialist correctly",
versionID: "customer Exclusive oof",
}).then((res: DownloadSchemaResponse) => {
if (res.statusCode == 200) {
// handle response
}
});
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.DownloadSchemaRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.DownloadSchemaResponse>
Download a particular schema revision for an Api.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
import { DownloadSchemaRevisionResponse } from "@speakeasy-api/speakeasy-client-sdk-typescript/dist/sdk/models/operations";
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
sdk.schemas.downloadSchemaRevision({
apiID: "Belarus hacking firewall",
revisionID: "Coupe affidavit Cheese",
versionID: "pink deposit",
}).then((res: DownloadSchemaRevisionResponse) => {
if (res.statusCode == 200) {
// handle response
}
});
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.DownloadSchemaRevisionRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.DownloadSchemaRevisionResponse>
Returns information about the last uploaded schema for a particular API version. This won't include the schema itself, that can be retrieved via the downloadSchema operation.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
import { GetSchemaResponse } from "@speakeasy-api/speakeasy-client-sdk-typescript/dist/sdk/models/operations";
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
sdk.schemas.getSchema({
apiID: "Assistant",
versionID: "banter Cotton withdrawal",
}).then((res: GetSchemaResponse) => {
if (res.statusCode == 200) {
// handle response
}
});
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetSchemaRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GetSchemaResponse>
Get a diff of two schema revisions for an Api.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
import { GetSchemaDiffResponse } from "@speakeasy-api/speakeasy-client-sdk-typescript/dist/sdk/models/operations";
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
sdk.schemas.getSchemaDiff({
apiID: "Tuna",
baseRevisionID: "South Van",
targetRevisionID: "whoever",
versionID: "henry Tulare",
}).then((res: GetSchemaDiffResponse) => {
if (res.statusCode == 200) {
// handle response
}
});
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetSchemaDiffRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GetSchemaDiffResponse>
Returns information about the last uploaded schema for a particular schema revision. This won't include the schema itself, that can be retrieved via the downloadSchema operation.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
import { GetSchemaRevisionResponse } from "@speakeasy-api/speakeasy-client-sdk-typescript/dist/sdk/models/operations";
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
sdk.schemas.getSchemaRevision({
apiID: "Mauritius",
revisionID: "West Rustic Plastic",
versionID: "Yttrium Loan",
}).then((res: GetSchemaRevisionResponse) => {
if (res.statusCode == 200) {
// handle response
}
});
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetSchemaRevisionRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GetSchemaRevisionResponse>
Returns information the schemas associated with a particular apiID. This won't include the schemas themselves, they can be retrieved via the downloadSchema operation.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
import { GetSchemasResponse } from "@speakeasy-api/speakeasy-client-sdk-typescript/dist/sdk/models/operations";
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
sdk.schemas.getSchemas({
apiID: "white",
versionID: "optical round",
}).then((res: GetSchemasResponse) => {
if (res.statusCode == 200) {
// handle response
}
});
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetSchemasRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GetSchemasResponse>
Allows uploading a schema for a particular API version. This will be used to populate ApiEndpoints and used as a base for any schema generation if present.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
import { RegisterSchemaResponse } from "@speakeasy-api/speakeasy-client-sdk-typescript/dist/sdk/models/operations";
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
sdk.schemas.registerSchema({
requestBody: {
file: {
content: "mg|mf\".]!\" as bytes <<<>>>,
file: "Bronze Table Blues",
},
},
apiID: "Oganesson",
versionID: "matrix Pennsylvania Southeast",
}).then((res: RegisterSchemaResponse) => {
if (res.statusCode == 200) {
// handle response
}
});
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.RegisterSchemaRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.RegisterSchemaResponse>