(Apis )
REST APIs for managing Api entities
Delete a particular version of an Api. The will also delete all associated ApiEndpoints, Metadata, Schemas & Request Logs (if using a Postgres datastore).
using SpeakeasySDK ;
using SpeakeasySDK . Models . Operations ;
using SpeakeasySDK . Models . Shared ;
var sdk = new SDK ( security : new Security ( ) {
APIKey = "<YOUR_API_KEY_HERE>" ,
} ) ;
DeleteApiRequest req = new DeleteApiRequest ( ) {
ApiID = "<value>" ,
VersionID = "<value>" ,
} ;
var res = await sdk . Apis . DeleteApiAsync ( req ) ;
// handle response
Parameter
Type
Required
Description
request
DeleteApiRequest
✔️
The request object to use for the request.
DeleteApiResponse
Error Object
Status Code
Content Type
SpeakeasySDK.Models.Errors.SDKException
4xx-5xx
/
This endpoint will generate any missing operations 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.
using SpeakeasySDK ;
using SpeakeasySDK . Models . Operations ;
using SpeakeasySDK . Models . Shared ;
var sdk = new SDK ( security : new Security ( ) {
APIKey = "<YOUR_API_KEY_HERE>" ,
} ) ;
GenerateOpenApiSpecRequest req = new GenerateOpenApiSpecRequest ( ) {
ApiID = "<value>" ,
VersionID = "<value>" ,
} ;
var res = await sdk . Apis . GenerateOpenApiSpecAsync ( req ) ;
// handle response
GenerateOpenApiSpecResponse
Error Object
Status Code
Content Type
SpeakeasySDK.Models.Errors.SDKException
4xx-5xx
/
GeneratePostmanCollection
Generates a postman collection containing all endpoints for a particular API. Includes variables produced for any path/query/header parameters included in the OpenAPI document.
using SpeakeasySDK ;
using SpeakeasySDK . Models . Operations ;
using SpeakeasySDK . Models . Shared ;
var sdk = new SDK ( security : new Security ( ) {
APIKey = "<YOUR_API_KEY_HERE>" ,
} ) ;
GeneratePostmanCollectionRequest req = new GeneratePostmanCollectionRequest ( ) {
ApiID = "<value>" ,
VersionID = "<value>" ,
} ;
var res = await sdk . Apis . GeneratePostmanCollectionAsync ( req ) ;
// handle response
GeneratePostmanCollectionResponse
Error Object
Status Code
Content Type
SpeakeasySDK.Models.Errors.SDKException
4xx-5xx
/
Get all Api versions for a particular ApiEndpoint.
Supports filtering the versions based on metadata attributes.
using SpeakeasySDK ;
using SpeakeasySDK . Models . Operations ;
using System . Collections . Generic ;
using SpeakeasySDK . Models . Shared ;
var sdk = new SDK ( security : new Security ( ) {
APIKey = "<YOUR_API_KEY_HERE>" ,
} ) ;
GetAllApiVersionsRequest req = new GetAllApiVersionsRequest ( ) {
ApiID = "<value>" ,
} ;
var res = await sdk . Apis . GetAllApiVersionsAsync ( req ) ;
// handle response
GetAllApiVersionsResponse
Error Object
Status Code
Content Type
SpeakeasySDK.Models.Errors.SDKException
4xx-5xx
/
Get a list of all Apis and their versions for a given workspace.
Supports filtering the APIs based on metadata attributes.
using SpeakeasySDK ;
using SpeakeasySDK . Models . Operations ;
using System . Collections . Generic ;
using SpeakeasySDK . Models . Shared ;
var sdk = new SDK ( security : new Security ( ) {
APIKey = "<YOUR_API_KEY_HERE>" ,
} ) ;
GetApisRequest req = new GetApisRequest ( ) { } ;
var res = await sdk . Apis . GetApisAsync ( req ) ;
// handle response
Parameter
Type
Required
Description
request
GetApisRequest
✔️
The request object to use for the request.
GetApisResponse
Error Object
Status Code
Content Type
SpeakeasySDK.Models.Errors.SDKException
4xx-5xx
/
Upsert an Api. If the Api does not exist, it will be created.
If the Api exists, it will be updated.
using SpeakeasySDK ;
using SpeakeasySDK . Models . Operations ;
using SpeakeasySDK . Models . Shared ;
using System . Collections . Generic ;
var sdk = new SDK ( security : new Security ( ) {
APIKey = "<YOUR_API_KEY_HERE>" ,
} ) ;
UpsertApiRequest req = new UpsertApiRequest ( ) {
Api = new ApiInput ( ) {
ApiId = "<value>" ,
Description = "Synchronised 5th generation knowledge user" ,
VersionId = "<value>" ,
} ,
ApiID = "<value>" ,
} ;
var res = await sdk . Apis . UpsertApiAsync ( req ) ;
// handle response
Parameter
Type
Required
Description
request
UpsertApiRequest
✔️
The request object to use for the request.
UpsertApiResponse
Error Object
Status Code
Content Type
SpeakeasySDK.Models.Errors.SDKException
4xx-5xx
/