(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).
declare(strict_types=1);
require 'vendor/autoload.php';
use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;
$security = new Shared\Security(
apiKey: '<YOUR_API_KEY_HERE>',
);
$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();
$request = new Operations\DeleteApiEndpointRequest(
apiEndpointID: '<id>',
apiID: '<id>',
versionID: '<id>',
);
$response = $sdk->apiEndpoints->deleteApiEndpoint(
request: $request
);
if ($response->statusCode === 200) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\DeleteApiEndpointRequest | ✔️ | The request object to use for the request. |
?Operations\DeleteApiEndpointResponse
Error Type | Status Code | Content Type |
---|---|---|
Errorors\Error | 4XX | application/json |
Errorors\SDKException | 5XX | */* |
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.
declare(strict_types=1);
require 'vendor/autoload.php';
use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;
$security = new Shared\Security(
apiKey: '<YOUR_API_KEY_HERE>',
);
$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();
$request = new Operations\FindApiEndpointRequest(
apiID: '<id>',
displayName: 'Don_Kihn39',
versionID: '<id>',
);
$response = $sdk->apiEndpoints->findApiEndpoint(
request: $request
);
if ($response->apiEndpoint !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\FindApiEndpointRequest | ✔️ | The request object to use for the request. |
?Operations\FindApiEndpointResponse
Error Type | Status Code | Content Type |
---|---|---|
Errorors\Error | 4XX | application/json |
Errorors\SDKException | 5XX | */* |
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.
declare(strict_types=1);
require 'vendor/autoload.php';
use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;
$security = new Shared\Security(
apiKey: '<YOUR_API_KEY_HERE>',
);
$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();
$request = new Operations\GenerateOpenApiSpecForApiEndpointRequest(
apiEndpointID: '<id>',
apiID: '<id>',
versionID: '<id>',
);
$response = $sdk->apiEndpoints->generateOpenApiSpecForApiEndpoint(
request: $request
);
if ($response->generateOpenApiSpecDiff !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\GenerateOpenApiSpecForApiEndpointRequest | ✔️ | The request object to use for the request. |
?Operations\GenerateOpenApiSpecForApiEndpointResponse
Error Type | Status Code | Content Type |
---|---|---|
Errorors\Error | 4XX | application/json |
Errorors\SDKException | 5XX | */* |
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.
declare(strict_types=1);
require 'vendor/autoload.php';
use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;
$security = new Shared\Security(
apiKey: '<YOUR_API_KEY_HERE>',
);
$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();
$request = new Operations\GeneratePostmanCollectionForApiEndpointRequest(
apiEndpointID: '<id>',
apiID: '<id>',
versionID: '<id>',
);
$response = $sdk->apiEndpoints->generatePostmanCollectionForApiEndpoint(
request: $request
);
if ($response->postmanCollection !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\GeneratePostmanCollectionForApiEndpointRequest | ✔️ | The request object to use for the request. |
?Operations\GeneratePostmanCollectionForApiEndpointResponse
Error Type | Status Code | Content Type |
---|---|---|
Errorors\Error | 4XX | application/json |
Errorors\SDKException | 5XX | */* |
Get all Api endpoints for a particular apiID.
declare(strict_types=1);
require 'vendor/autoload.php';
use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;
$security = new Shared\Security(
apiKey: '<YOUR_API_KEY_HERE>',
);
$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();
$request = new Operations\GetAllApiEndpointsRequest(
apiID: '<id>',
);
$response = $sdk->apiEndpoints->getAllApiEndpoints(
request: $request
);
if ($response->apiEndpoints !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\GetAllApiEndpointsRequest | ✔️ | The request object to use for the request. |
?Operations\GetAllApiEndpointsResponse
Error Type | Status Code | Content Type |
---|---|---|
Errorors\Error | 4XX | application/json |
Errorors\SDKException | 5XX | */* |
Get all ApiEndpoints for a particular apiID and versionID.
declare(strict_types=1);
require 'vendor/autoload.php';
use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;
$security = new Shared\Security(
apiKey: '<YOUR_API_KEY_HERE>',
);
$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();
$request = new Operations\GetAllForVersionApiEndpointsRequest(
apiID: '<id>',
versionID: '<id>',
);
$response = $sdk->apiEndpoints->getAllForVersionApiEndpoints(
request: $request
);
if ($response->apiEndpoints !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\GetAllForVersionApiEndpointsRequest | ✔️ | The request object to use for the request. |
?Operations\GetAllForVersionApiEndpointsResponse
Error Type | Status Code | Content Type |
---|---|---|
Errorors\Error | 4XX | application/json |
Errorors\SDKException | 5XX | */* |
Get an ApiEndpoint.
declare(strict_types=1);
require 'vendor/autoload.php';
use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;
$security = new Shared\Security(
apiKey: '<YOUR_API_KEY_HERE>',
);
$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();
$request = new Operations\GetApiEndpointRequest(
apiEndpointID: '<id>',
apiID: '<id>',
versionID: '<id>',
);
$response = $sdk->apiEndpoints->getApiEndpoint(
request: $request
);
if ($response->apiEndpoint !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\GetApiEndpointRequest | ✔️ | The request object to use for the request. |
?Operations\GetApiEndpointResponse
Error Type | Status Code | Content Type |
---|---|---|
Errorors\Error | 4XX | application/json |
Errorors\SDKException | 5XX | */* |
Upsert an ApiEndpoint. If the ApiEndpoint does not exist it will be created, otherwise it will be updated.
declare(strict_types=1);
require 'vendor/autoload.php';
use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;
$security = new Shared\Security(
apiKey: '<YOUR_API_KEY_HERE>',
);
$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();
$request = new Operations\UpsertApiEndpointRequest(
apiEndpoint: new Shared\ApiEndpointInput(
apiEndpointId: '<id>',
description: 'commandeer equate pish psst hoot ugh frankly supposing',
displayName: 'Eliseo.Little15',
method: '<value>',
path: '/etc/defaults',
versionId: '<id>',
),
apiEndpointID: '<id>',
apiID: '<id>',
versionID: '<id>',
);
$response = $sdk->apiEndpoints->upsertApiEndpoint(
request: $request
);
if ($response->apiEndpoint !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\UpsertApiEndpointRequest | ✔️ | The request object to use for the request. |
?Operations\UpsertApiEndpointResponse
Error Type | Status Code | Content Type |
---|---|---|
Errorors\Error | 4XX | application/json |
Errorors\SDKException | 5XX | */* |