Skip to content

Latest commit

 

History

History
573 lines (350 loc) · 17.8 KB

File metadata and controls

573 lines (350 loc) · 17.8 KB

Workspaces

Overview

Available Operations

get_all

Returns a list of workspaces a user has access too

Example Usage

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

Response

T.nilable(::OpenApiSDK::Operations::GetWorkspacesResponse)

get

Get information about a particular workspace by context.

Example Usage

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

Response

T.nilable(::OpenApiSDK::Operations::GetWorkspaceByContextResponse)

create

Creates a workspace

Example Usage

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

Parameters

Parameter Type Required Description
request ::OpenApiSDK::Shared::Workspace ✔️ The request object to use for the request.

Response

T.nilable(::OpenApiSDK::Operations::CreateWorkspaceResponse)

get_by_id

Get information about a particular workspace.

Example Usage

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

Parameters

Parameter Type Required Description
workspace_id ::String ✔️ Unique identifier of the workspace.

Response

T.nilable(::OpenApiSDK::Operations::GetWorkspaceResponse)

update_details

Update information about a particular workspace.

Example Usage

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

Parameters

Parameter Type Required Description
workspace_id ::String ✔️ Unique identifier of the workspace.
workspace ::OpenApiSDK::Shared::Workspace ✔️ The workspace details to update.

Response

T.nilable(::OpenApiSDK::Operations::UpdateWorkspaceDetailsResponse)

get_settings

Get settings about a particular workspace.

Example Usage

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

Parameters

Parameter Type Required Description
workspace_id ::String ✔️ Unique identifier of the workspace.

Response

T.nilable(::OpenApiSDK::Operations::GetWorkspaceSettingsResponse)

update_settings

Update settings about a particular workspace.

Example Usage

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

Parameters

Parameter Type Required Description
workspace_id ::String ✔️ Unique identifier of the workspace.
workspace_settings ::OpenApiSDK::Shared::WorkspaceSettings ✔️ The workspace settings to update.

Response

T.nilable(::OpenApiSDK::Operations::UpdateWorkspaceSettingsResponse)

get_team

Get team members for a particular workspace

Example Usage

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

Parameters

Parameter Type Required Description
workspace_id ::String ✔️ Unique identifier of the workspace.

Response

T.nilable(::OpenApiSDK::Operations::GetWorkspaceTeamResponse)

grant_access

Grant a user access to a particular workspace

Example Usage

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

Parameters

Parameter Type Required Description
workspace_id ::String ✔️ Unique identifier of the workspace.
email ::String ✔️ Email of the user to grant access to.

Response

T.nilable(::OpenApiSDK::Operations::GrantUserAccessToWorkspaceResponse)

revoke_access

Revoke a user's access to a particular workspace

Example Usage

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

Parameters

Parameter Type Required Description
workspace_id ::String ✔️ Unique identifier of the workspace.
user_id ::String ✔️ Unique identifier of the user.

Response

T.nilable(::OpenApiSDK::Operations::RevokeUserAccessToWorkspaceResponse)

get_tokens

Get tokens for a particular workspace

Example Usage

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

Parameters

Parameter Type Required Description
workspace_id ::String ✔️ Unique identifier of the workspace.

Response

T.nilable(::OpenApiSDK::Operations::GetWorkspaceTokensResponse)

create_token

Create a token for a particular workspace

Example Usage

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

Parameters

Parameter Type Required Description
workspace_id ::String ✔️ Unique identifier of the workspace.
workspace_token ::OpenApiSDK::Shared::WorkspaceToken ✔️ N/A

Response

T.nilable(::OpenApiSDK::Operations::CreateWorkspaceTokenResponse)

delete_token

Delete a token for a particular workspace

Example Usage

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

Parameters

Parameter Type Required Description
workspace_id ::String ✔️ Unique identifier of the workspace.
token_id ::String ✔️ Unique identifier of the token.

Response

T.nilable(::OpenApiSDK::Operations::DeleteWorkspaceTokenResponse)

get_feature_flags

Get workspace feature flags

Example Usage

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

Parameters

Parameter Type Required Description
workspace_id ::String ✔️ Unique identifier of the workspace.

Response

T.nilable(::OpenApiSDK::Operations::GetWorkspaceFeatureFlagsResponse)