(metadata)
REST APIs for managing Version Metadata entities
- deleteVersionMetadata - Delete metadata for a particular apiID and versionID.
- getVersionMetadata - Get all metadata for a particular apiID and versionID.
- insertVersionMetadata - Insert metadata for a particular apiID and versionID.
Delete metadata for a particular apiID and versionID.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
const speakeasy = new Speakeasy({
security: {
apiKey: "<YOUR_API_KEY_HERE>",
},
});
async function run() {
const result = await speakeasy.metadata.deleteVersionMetadata({
apiID: "<value>",
versionID: "<value>",
metaKey: "<value>",
metaValue: "<value>",
});
// Handle the result
console.log(result)
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.DeleteVersionMetadataRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<shared.ErrorT>
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Get all metadata for a particular apiID and versionID.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
const speakeasy = new Speakeasy({
security: {
apiKey: "<YOUR_API_KEY_HERE>",
},
});
async function run() {
const result = await speakeasy.metadata.getVersionMetadata({
apiID: "<value>",
versionID: "<value>",
});
// Handle the result
console.log(result)
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetVersionMetadataRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.GetVersionMetadataResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Insert metadata for a particular apiID and versionID.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
const speakeasy = new Speakeasy({
security: {
apiKey: "<YOUR_API_KEY_HERE>",
},
});
async function run() {
const result = await speakeasy.metadata.insertVersionMetadata({
apiID: "<value>",
versionID: "<value>",
versionMetadata: {
metaKey: "<value>",
metaValue: "<value>",
},
});
// Handle the result
console.log(result)
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.InsertVersionMetadataRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.InsertVersionMetadataResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |