(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";
import { DeleteApiEndpointResponse } from "@speakeasy-api/speakeasy-client-sdk-typescript/dist/sdk/models/operations";
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
sdk.apiEndpoints.deleteApiEndpoint({
apiEndpointID: "unde",
apiID: "nulla",
versionID: "corrupti",
}).then((res: DeleteApiEndpointResponse) => {
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";
import { FindApiEndpointResponse } from "@speakeasy-api/speakeasy-client-sdk-typescript/dist/sdk/models/operations";
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
sdk.apiEndpoints.findApiEndpoint({
apiID: "illum",
displayName: "vel",
versionID: "error",
}).then((res: FindApiEndpointResponse) => {
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";
import { GenerateOpenApiSpecForApiEndpointResponse } from "@speakeasy-api/speakeasy-client-sdk-typescript/dist/sdk/models/operations";
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
sdk.apiEndpoints.generateOpenApiSpecForApiEndpoint({
apiEndpointID: "deserunt",
apiID: "suscipit",
versionID: "iure",
}).then((res: GenerateOpenApiSpecForApiEndpointResponse) => {
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";
import { GeneratePostmanCollectionForApiEndpointResponse } from "@speakeasy-api/speakeasy-client-sdk-typescript/dist/sdk/models/operations";
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
sdk.apiEndpoints.generatePostmanCollectionForApiEndpoint({
apiEndpointID: "magnam",
apiID: "debitis",
versionID: "ipsa",
}).then((res: GeneratePostmanCollectionForApiEndpointResponse) => {
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";
import { GetAllApiEndpointsResponse } from "@speakeasy-api/speakeasy-client-sdk-typescript/dist/sdk/models/operations";
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
sdk.apiEndpoints.getAllApiEndpoints({
apiID: "delectus",
}).then((res: GetAllApiEndpointsResponse) => {
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";
import { GetAllForVersionApiEndpointsResponse } from "@speakeasy-api/speakeasy-client-sdk-typescript/dist/sdk/models/operations";
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
sdk.apiEndpoints.getAllForVersionApiEndpoints({
apiID: "tempora",
versionID: "suscipit",
}).then((res: GetAllForVersionApiEndpointsResponse) => {
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";
import { GetApiEndpointResponse } from "@speakeasy-api/speakeasy-client-sdk-typescript/dist/sdk/models/operations";
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
sdk.apiEndpoints.getApiEndpoint({
apiEndpointID: "molestiae",
apiID: "minus",
versionID: "placeat",
}).then((res: GetApiEndpointResponse) => {
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";
import { UpsertApiEndpointResponse } from "@speakeasy-api/speakeasy-client-sdk-typescript/dist/sdk/models/operations";
const sdk = new Speakeasy({
security: {
apiKey: "",
},
});
sdk.apiEndpoints.upsertApiEndpoint({
apiEndpointInput: {
apiEndpointId: "voluptatum",
description: "iusto",
displayName: "excepturi",
method: "nisi",
path: "recusandae",
versionId: "temporibus",
},
apiEndpointID: "ab",
apiID: "quis",
versionID: "veritatis",
}).then((res: UpsertApiEndpointResponse) => {
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>