- get_all - Get workspaces for a user
- get - Get workspace by context
- create - Create a workspace
- get_by_id - Get workspace
- update_details - Update workspace details
- get_settings - Get workspace settings
- update_settings - Update workspace settings
- get_team - Get team members for a particular workspace
- grant_access - Grant a user access to a particular workspace
- revoke_access - Revoke a user's access to a particular workspace
- get_tokens - Get tokens for a particular workspace
- create_token - Create a token for a particular workspace
- delete_token - Delete a token for a particular workspace
- get_feature_flags - Get workspace feature flags
Returns a list of workspaces a user has access too
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.workspaces.get_all()
if ! res.workspaces.nil?
# handle response
end
T.nilable(::OpenApiSDK::Operations::GetWorkspacesResponse)
Get information about a particular workspace by context.
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.workspaces.get()
if ! res.workspace_and_organization.nil?
# handle response
end
T.nilable(::OpenApiSDK::Operations::GetWorkspaceByContextResponse)
Creates a workspace
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
req = ::OpenApiSDK::Shared::Workspace.new(
created_at: DateTime.iso8601('2023-06-18T07:14:55.338Z'),
id: "<id>",
name: "<value>",
organization_id: "<id>",
slug: "<value>",
telemetry_disabled: false,
updated_at: DateTime.iso8601('2023-12-01T17:06:07.804Z'),
verified: false,
)
res = s.workspaces.create(req)
if ! res.workspace.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
request |
::OpenApiSDK::Shared::Workspace | ✔️ | The request object to use for the request. |
T.nilable(::OpenApiSDK::Operations::CreateWorkspaceResponse)
Get information about a particular workspace.
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.workspaces.get_by_id(workspace_id="<id>")
if ! res.workspace.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
workspace_id |
::String | ✔️ | Unique identifier of the workspace. |
T.nilable(::OpenApiSDK::Operations::GetWorkspaceResponse)
Update information about a particular workspace.
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.workspaces.update_details(workspace_id="<id>", workspace=::OpenApiSDK::Shared::Workspace.new(
created_at: DateTime.iso8601('2024-02-01T20:44:31.776Z'),
id: "<id>",
name: "<value>",
organization_id: "<id>",
slug: "<value>",
telemetry_disabled: false,
updated_at: DateTime.iso8601('2023-08-04T18:26:06.739Z'),
verified: false,
))
if res.status_code == 200
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
workspace_id |
::String | ✔️ | Unique identifier of the workspace. |
workspace |
::OpenApiSDK::Shared::Workspace | ✔️ | The workspace details to update. |
T.nilable(::OpenApiSDK::Operations::UpdateWorkspaceDetailsResponse)
Get settings about a particular workspace.
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.workspaces.get_settings(workspace_id="<id>")
if ! res.workspace_settings.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
workspace_id |
::String | ✔️ | Unique identifier of the workspace. |
T.nilable(::OpenApiSDK::Operations::GetWorkspaceSettingsResponse)
Update settings about a particular workspace.
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.workspaces.update_settings(workspace_id="<id>", workspace_settings=::OpenApiSDK::Shared::WorkspaceSettings.new(
workspace_id: "<id>",
))
if res.status_code == 200
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
workspace_id |
::String | ✔️ | Unique identifier of the workspace. |
workspace_settings |
::OpenApiSDK::Shared::WorkspaceSettings | ✔️ | The workspace settings to update. |
T.nilable(::OpenApiSDK::Operations::UpdateWorkspaceSettingsResponse)
Get team members for a particular workspace
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.workspaces.get_team(workspace_id="<id>")
if ! res.workspace_team_response.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
workspace_id |
::String | ✔️ | Unique identifier of the workspace. |
T.nilable(::OpenApiSDK::Operations::GetWorkspaceTeamResponse)
Grant a user access to a particular workspace
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.workspaces.grant_access(workspace_id="<id>", email="[email protected]")
if ! res.workspace_invite_response.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
workspace_id |
::String | ✔️ | Unique identifier of the workspace. |
email |
::String | ✔️ | Email of the user to grant access to. |
T.nilable(::OpenApiSDK::Operations::GrantUserAccessToWorkspaceResponse)
Revoke a user's access to a particular workspace
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.workspaces.revoke_access(workspace_id="<id>", user_id="<id>")
if res.status_code == 200
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
workspace_id |
::String | ✔️ | Unique identifier of the workspace. |
user_id |
::String | ✔️ | Unique identifier of the user. |
T.nilable(::OpenApiSDK::Operations::RevokeUserAccessToWorkspaceResponse)
Get tokens for a particular workspace
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.workspaces.get_tokens(workspace_id="<id>")
if ! res.workspace_tokens.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
workspace_id |
::String | ✔️ | Unique identifier of the workspace. |
T.nilable(::OpenApiSDK::Operations::GetWorkspaceTokensResponse)
Create a token for a particular workspace
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.workspaces.create_token(workspace_id="<id>", workspace_token=::OpenApiSDK::Shared::WorkspaceToken.new(
id: "<id>",
name: "<value>",
alg: "<value>",
key: "<key>",
created_at: "<value>",
))
if res.status_code == 200
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
workspace_id |
::String | ✔️ | Unique identifier of the workspace. |
workspace_token |
::OpenApiSDK::Shared::WorkspaceToken | ✔️ | N/A |
T.nilable(::OpenApiSDK::Operations::CreateWorkspaceTokenResponse)
Delete a token for a particular workspace
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.workspaces.delete_token(workspace_id="<id>", token_id="<id>")
if res.status_code == 200
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
workspace_id |
::String | ✔️ | Unique identifier of the workspace. |
token_id |
::String | ✔️ | Unique identifier of the token. |
T.nilable(::OpenApiSDK::Operations::DeleteWorkspaceTokenResponse)
Get workspace feature flags
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.workspaces.get_feature_flags(workspace_id="<id>")
if ! res.workspace_feature_flag_response.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
workspace_id |
::String | ✔️ | Unique identifier of the workspace. |
T.nilable(::OpenApiSDK::Operations::GetWorkspaceFeatureFlagsResponse)