(Organizations)
REST APIs for managing Organizations (speakeasy L1 Tenancy construct)
- Create - Create an organization
- CreateFreeTrial - Create a free trial for an organization
- Get - Get organization
- GetAll - Get organizations for a user
- GetUsage - Get billing usage summary for a particular organization
Creates an organization
using SpeakeasySDK;
using SpeakeasySDK.Models.Shared;
using System;
var sdk = new SDK(security: new Security() {
APIKey = "<YOUR_API_KEY_HERE>",
});
Organization req = new Organization() {
AccountType = AccountType.ScaleUp,
CreatedAt = System.DateTime.Parse("2024-11-30T17:06:07.804Z"),
Id = "<id>",
Name = "<value>",
Slug = "<value>",
SsoActivated = false,
TelemetryDisabled = false,
UpdatedAt = System.DateTime.Parse("2024-04-02T12:48:32.253Z"),
};
var res = await sdk.Organizations.CreateAsync(req);
// handle response
Parameter | Type | Required | Description |
---|---|---|---|
request |
Organization | ✔️ | The request object to use for the request. |
Error Type | Status Code | Content Type |
---|---|---|
SpeakeasySDK.Models.Errors.Error | 4XX | application/json |
SpeakeasySDK.Models.Errors.SDKException | 5XX | */* |
Creates a free trial for an organization
using SpeakeasySDK;
using SpeakeasySDK.Models.Shared;
var sdk = new SDK(security: new Security() {
APIKey = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Organizations.CreateFreeTrialAsync();
// handle response
Error Type | Status Code | Content Type |
---|---|---|
SpeakeasySDK.Models.Errors.Error | 4XX | application/json |
SpeakeasySDK.Models.Errors.SDKException | 5XX | */* |
Get information about a particular organization.
using SpeakeasySDK;
using SpeakeasySDK.Models.Operations;
using SpeakeasySDK.Models.Shared;
var sdk = new SDK(security: new Security() {
APIKey = "<YOUR_API_KEY_HERE>",
});
GetOrganizationRequest req = new GetOrganizationRequest() {
OrganizationID = "<id>",
};
var res = await sdk.Organizations.GetAsync(req);
// handle response
Parameter | Type | Required | Description |
---|---|---|---|
request |
GetOrganizationRequest | ✔️ | The request object to use for the request. |
Error Type | Status Code | Content Type |
---|---|---|
SpeakeasySDK.Models.Errors.Error | 4XX | application/json |
SpeakeasySDK.Models.Errors.SDKException | 5XX | */* |
Returns a list of organizations a user has access too
using SpeakeasySDK;
using SpeakeasySDK.Models.Shared;
var sdk = new SDK(security: new Security() {
APIKey = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Organizations.GetAllAsync();
// handle response
Error Type | Status Code | Content Type |
---|---|---|
SpeakeasySDK.Models.Errors.Error | 4XX | application/json |
SpeakeasySDK.Models.Errors.SDKException | 5XX | */* |
Returns a billing usage summary by target languages for a particular organization
using SpeakeasySDK;
using SpeakeasySDK.Models.Shared;
var sdk = new SDK(security: new Security() {
APIKey = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Organizations.GetUsageAsync();
// handle response
Error Type | Status Code | Content Type |
---|---|---|
SpeakeasySDK.Models.Errors.Error | 4XX | application/json |
SpeakeasySDK.Models.Errors.SDKException | 5XX | */* |