(apiEndpoints)
REST APIs for managing ApiEndpoint entities
- deleteApiEndpoint - Delete an ApiEndpoint.
- findApiEndpoint - Find an ApiEndpoint via its displayName.
- generateOpenApiSpecForApiEndpoint - Generate an OpenAPI specification for a particular ApiEndpoint.
- generatePostmanCollectionForApiEndpoint - Generate a Postman collection for a particular ApiEndpoint.
- getAllApiEndpoints - Get all Api endpoints for a particular apiID.
- getAllForVersionApiEndpoints - Get all ApiEndpoints for a particular apiID and versionID.
- getApiEndpoint - Get an ApiEndpoint.
- upsertApiEndpoint - Upsert an ApiEndpoint.
Delete an ApiEndpoint. This will also delete all associated Request Logs (if using a Postgres datastore).
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
(async() => {
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
const res = await sdk.apiEndpoints.deleteApiEndpoint({
apiEndpointID: "string",
apiID: "string",
versionID: "string",
});
if (res.statusCode == 200) {
// handle response
}
})();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.DeleteApiEndpointRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.DeleteApiEndpointResponse>
Find an ApiEndpoint via its displayName (set by operationId from a registered OpenAPI schema). This is useful for finding the ID of an ApiEndpoint to use in the /v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID} endpoints.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
(async() => {
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
const res = await sdk.apiEndpoints.findApiEndpoint({
apiID: "string",
displayName: "string",
versionID: "string",
});
if (res.statusCode == 200) {
// handle response
}
})();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.FindApiEndpointRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.FindApiEndpointResponse>
This endpoint will generate a new operation in any registered OpenAPI document if the operation does not already exist in the document. Returns the original document and the newly generated document allowing a diff to be performed to see what has changed.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
(async() => {
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
const res = await sdk.apiEndpoints.generateOpenApiSpecForApiEndpoint({
apiEndpointID: "string",
apiID: "string",
versionID: "string",
});
if (res.statusCode == 200) {
// handle response
}
})();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GenerateOpenApiSpecForApiEndpointRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GenerateOpenApiSpecForApiEndpointResponse>
Generates a postman collection that allows the endpoint to be called from postman variables produced for any path/query/header parameters included in the OpenAPI document.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
(async() => {
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
const res = await sdk.apiEndpoints.generatePostmanCollectionForApiEndpoint({
apiEndpointID: "string",
apiID: "string",
versionID: "string",
});
if (res.statusCode == 200) {
// handle response
}
})();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GeneratePostmanCollectionForApiEndpointRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GeneratePostmanCollectionForApiEndpointResponse>
Get all Api endpoints for a particular apiID.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
(async() => {
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
const res = await sdk.apiEndpoints.getAllApiEndpoints({
apiID: "string",
});
if (res.statusCode == 200) {
// handle response
}
})();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetAllApiEndpointsRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GetAllApiEndpointsResponse>
Get all ApiEndpoints for a particular apiID and versionID.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
(async() => {
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
const res = await sdk.apiEndpoints.getAllForVersionApiEndpoints({
apiID: "string",
versionID: "string",
});
if (res.statusCode == 200) {
// handle response
}
})();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetAllForVersionApiEndpointsRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GetAllForVersionApiEndpointsResponse>
Get an ApiEndpoint.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
(async() => {
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
const res = await sdk.apiEndpoints.getApiEndpoint({
apiEndpointID: "string",
apiID: "string",
versionID: "string",
});
if (res.statusCode == 200) {
// handle response
}
})();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetApiEndpointRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GetApiEndpointResponse>
Upsert an ApiEndpoint. If the ApiEndpoint does not exist it will be created, otherwise it will be updated.
import { Speakeasy } from "@speakeasy-api/speakeasy-client-sdk-typescript";
(async() => {
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
const res = await sdk.apiEndpoints.upsertApiEndpoint({
apiEndpointInput: {
apiEndpointId: "string",
description: "Public-key systematic attitude",
displayName: "string",
method: "string",
path: "/etc/periodic",
versionId: "string",
},
apiEndpointID: "string",
apiID: "string",
versionID: "string",
});
if (res.statusCode == 200) {
// handle response
}
})();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.UpsertApiEndpointRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.UpsertApiEndpointResponse>