# README
Go API client for openapi
Rockset's REST API allows for creating and managing all resources in Rockset. Each supported endpoint is documented below.
All requests must be authorized with a Rockset API key, which can be created in the Rockset console. The API key must be provided as ApiKey <api_key>
in the Authorization
request header. For example:
Authorization: ApiKey aB35kDjg93J5nsf4GjwMeErAVd832F7ad4vhsW1S02kfZiab42sTsfW5Sxt25asT
All endpoints are only accessible via https.
Build something awesome!
Overview
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: v1
- Package version: 0.25.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Installation
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import openapi "github.com/rockset/rockset-go-client"
To use a proxy, set the environment variable HTTP_PROXY
:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Configuration of Server URL
Default configuration comes with Servers
field that contains server objects as defined in the OpenAPI specification.
Select Server Configuration
For using other server than the one defined on index 0 set context value sw.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1)
Templated Server URL
Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), openapi.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
URLs Configuration per Operation
Each operation can use different server URL defined using OperationServers
map in the Configuration
.
An operation is uniquely identified by "{classname}Service.{nickname}"
string.
Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices
and sw.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
Documentation for API Endpoints
All URIs are relative to https://api.use1a1.rockset.com
Class | Method | HTTP request | Description |
---|---|---|---|
APIKeysApi | CreateApiKey | Post /v1/orgs/self/users/self/apikeys | Create API Key |
APIKeysApi | DeleteApiKey | Delete /v1/orgs/self/users/{user}/apikeys/{name} | Delete API Key |
APIKeysApi | GetApiKey | Get /v1/orgs/self/users/{user}/apikeys/{name} | Retrieve API Key |
APIKeysApi | ListApiKeys | Get /v1/orgs/self/users/{user}/apikeys | List API Keys |
APIKeysApi | UpdateApiKey | Post /v1/orgs/self/users/{user}/apikeys/{name} | Update API Key State |
AliasesApi | CreateAlias | Post /v1/orgs/self/ws/{workspace}/aliases | Create Alias |
AliasesApi | DeleteAlias | Delete /v1/orgs/self/ws/{workspace}/aliases/{alias} | Delete Alias |
AliasesApi | GetAlias | Get /v1/orgs/self/ws/{workspace}/aliases/{alias} | Retrieve Alias |
AliasesApi | ListAliases | Get /v1/orgs/self/aliases | List Aliases |
AliasesApi | UpdateAlias | Post /v1/orgs/self/ws/{workspace}/aliases/{alias} | Update Alias |
AliasesApi | WorkspaceAliases | Get /v1/orgs/self/ws/{workspace}/aliases | List Aliases in Workspace |
CollectionsApi | CreateCollection | Post /v1/orgs/self/ws/{workspace}/collections | Create Collection |
CollectionsApi | DeleteCollection | Delete /v1/orgs/self/ws/{workspace}/collections/{collection} | Delete Collection |
CollectionsApi | GetCollection | Get /v1/orgs/self/ws/{workspace}/collections/{collection} | Retrieve Collection |
CollectionsApi | GetCollectionOffsets | Post /v1/orgs/self/ws/{workspace}/collections/{collection}/offsets/commit | Get Collection Commit |
CollectionsApi | ListCollections | Get /v1/orgs/self/collections | List Collections |
CollectionsApi | UpdateCollection | Put /v1/orgs/self/ws/{workspace}/collections/{collection} | Update Collection |
CollectionsApi | WorkspaceCollections | Get /v1/orgs/self/ws/{workspace}/collections | List Collections in Workspace |
CustomRolesApi | CreateRole | Post /v1/orgs/self/roles | Create a Role |
CustomRolesApi | DeleteRole | Delete /v1/orgs/self/roles/{roleName} | Delete a Role |
CustomRolesApi | GetRole | Get /v1/orgs/self/roles/{roleName} | Retrieve role |
CustomRolesApi | ListRoles | Get /v1/orgs/self/roles | List Roles |
CustomRolesApi | UpdateRole | Post /v1/orgs/self/roles/{roleName} | Update a Role |
DeploymentSettingsApi | GetDeploymentSettings | Get /v1/orgs/self/deploymentsettings | Retrieve Deployment Settings |
DeploymentSettingsApi | UpdateDeploymentSettings | Put /v1/orgs/self/deploymentsettings | Update Deployment Settings |
DocumentsApi | AddDocuments | Post /v1/orgs/self/ws/{workspace}/collections/{collection}/docs | Add Documents |
DocumentsApi | DeleteDocuments | Delete /v1/orgs/self/ws/{workspace}/collections/{collection}/docs | Delete Documents |
DocumentsApi | PatchDocuments | Patch /v1/orgs/self/ws/{workspace}/collections/{collection}/docs | Patch Documents |
IntegrationsApi | CreateIntegration | Post /v1/orgs/self/integrations | Create Integration |
IntegrationsApi | DeleteIntegration | Delete /v1/orgs/self/integrations/{integration} | Delete Integration |
IntegrationsApi | GetIntegration | Get /v1/orgs/self/integrations/{integration} | Retrieve Integration |
IntegrationsApi | ListIntegrations | Get /v1/orgs/self/integrations | List Integrations |
IntegrationsApi | UpdateIntegration | Put /v1/orgs/self/integrations/{integration} | Update Integration |
OrganizationsApi | GetOrganization | Get /v1/orgs/self | Get Organization |
QueriesApi | CancelQuery | Delete /v1/orgs/self/queries/{queryId} | Cancel Query |
QueriesApi | GetQuery | Get /v1/orgs/self/queries/{queryId} | Retrieve Query |
QueriesApi | GetQueryResults | Get /v1/orgs/self/queries/{queryId}/pages | Retrieve Query Results Page |
QueriesApi | ListActiveQueries | Get /v1/orgs/self/queries | List Queries |
QueriesApi | Query | Post /v1/orgs/self/queries | Execute SQL Query |
QueriesApi | Validate | Post /v1/orgs/self/queries/validations | Validate Query |
QueryLambdasApi | CreateQueryLambda | Post /v1/orgs/self/ws/{workspace}/lambdas | Create Query Lambda |
QueryLambdasApi | CreateQueryLambdaTag | Post /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/tags | Create Query Lambda Tag |
QueryLambdasApi | DeleteQueryLambda | Delete /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda} | Delete Query Lambda |
QueryLambdasApi | DeleteQueryLambdaTag | Delete /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/tags/{tag} | Delete Query Lambda Tag Version |
QueryLambdasApi | DeleteQueryLambdaVersion | Delete /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/version/{version} | Delete Query Lambda Version |
QueryLambdasApi | ExecuteQueryLambda | Post /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/versions/{version} | Execute Query Lambda By Version |
QueryLambdasApi | ExecuteQueryLambdaByTag | Post /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/tags/{tag} | Execute Query Lambda By Tag |
QueryLambdasApi | GetQueryLambdaTagVersion | Get /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/tags/{tag} | Retrieve Query Lambda Tag |
QueryLambdasApi | GetQueryLambdaVersion | Get /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/versions/{version} | Retrieve Query Lambda Version |
QueryLambdasApi | ListAllQueryLambdas | Get /v1/orgs/self/lambdas | List Query Lambdas |
QueryLambdasApi | ListQueryLambdaTags | Get /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/tags | List Query Lambda Tags |
QueryLambdasApi | ListQueryLambdaVersions | Get /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/versions | List Query Lambda Versions |
QueryLambdasApi | ListQueryLambdasInWorkspace | Get /v1/orgs/self/ws/{workspace}/lambdas | List Query Lambdas in Workspace |
QueryLambdasApi | UpdateQueryLambda | Post /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/versions | Update Query Lambda |
ScheduledLambdasApi | CreateScheduledLambda | Post /v1/orgs/self/ws/{workspace}/scheduled_lambdas | Create a Scheduled Lambda mapping |
ScheduledLambdasApi | DeleteScheduledLambda | Delete /v1/orgs/self/ws/{workspace}/scheduled_lambdas/{scheduledLambdaId} | Delete a Scheduled Lambda mapping |
ScheduledLambdasApi | GetScheduledLambda | Get /v1/orgs/self/ws/{workspace}/scheduled_lambdas/{scheduledLambdaId} | Retrieve a Scheduled Lambda mapping |
ScheduledLambdasApi | UpdateScheduledLambda | Post /v1/orgs/self/ws/{workspace}/scheduled_lambdas/{scheduledLambdaId} | Update a Scheduled Lambda mapping |
SharedLambdasApi | ExecutePublicQueryLambdaWithParams | Post /v1/public/shared_lambdas/{public_access_id} | Execute a Public Query Lambda |
SourcesApi | CreateSource | Post /v1/orgs/self/ws/{workspace}/collections/{collection}/sources | Create a source |
SourcesApi | DeleteSource | Delete /v1/orgs/self/ws/{workspace}/collections/{collection}/sources/{source} | Delete Collection source |
SourcesApi | GetSource | Get /v1/orgs/self/ws/{workspace}/collections/{collection}/sources/{source} | Retrieve source |
SourcesApi | ListCollectionSources | Get /v1/orgs/self/ws/{workspace}/collections/{collection}/sources | List sources in collection |
SourcesApi | ResumeSource | Post /v1/orgs/self/ws/{workspace}/collections/{collection}/sources/{source}/resume | Resume source ingest |
SourcesApi | SuspendSource | Post /v1/orgs/self/ws/{workspace}/collections/{collection}/sources/{source}/suspend | Suspend source ingest |
SourcesApi | UpdateSource | Put /v1/orgs/self/ws/{workspace}/collections/{collection}/sources/{source} | Update a collection source |
UsersApi | CreateUser | Post /v1/orgs/self/users | Create User |
UsersApi | DeleteUser | Delete /v1/orgs/self/users/{user} | Delete User |
UsersApi | GetCurrentUser | Get /v1/orgs/self/users/self | Retrieve Current User |
UsersApi | GetUser | Get /v1/orgs/self/users/{user} | Retrieve User |
UsersApi | ListUnsubscribePreferences | Get /v1/orgs/self/users/self/preferences | Retrieve Notification Preferences |
UsersApi | ListUsers | Get /v1/orgs/self/users | List Users |
UsersApi | UpdateUnsubscribePreferences | Post /v1/orgs/self/users/self/preferences | Update Notification Preferences |
UsersApi | UpdateUser | Post /v1/orgs/self/users/{user} | Update User |
ViewsApi | CreateView | Post /v1/orgs/self/ws/{workspace}/views | Create View |
ViewsApi | DeleteView | Delete /v1/orgs/self/ws/{workspace}/views/{view} | Delete View |
ViewsApi | GetView | Get /v1/orgs/self/ws/{workspace}/views/{view} | Retrieve View |
ViewsApi | ListViews | Get /v1/orgs/self/views | List Views |
ViewsApi | UpdateView | Post /v1/orgs/self/ws/{workspace}/views/{view} | Update View |
ViewsApi | WorkspaceViews | Get /v1/orgs/self/ws/{workspace}/views | List Views in Workspace |
VirtualInstancesApi | CreateVirtualInstance | Post /v1/orgs/self/virtualinstances | Create Virtual Instance |
VirtualInstancesApi | DeleteVirtualInstance | Delete /v1/orgs/self/virtualinstances/{virtualInstanceId} | Delete Virtual Instance |
VirtualInstancesApi | GetCollectionMount | Get /v1/orgs/self/virtualinstances/{virtualInstanceId}/mounts/{collectionPath} | Get Collection Mount |
VirtualInstancesApi | GetMountOffsets | Post /v1/orgs/self/virtualinstances/{virtualInstanceId}/mounts/{collectionPath}/offsets/commit | Get Collection Commit |
VirtualInstancesApi | GetVirtualInstance | Get /v1/orgs/self/virtualinstances/{virtualInstanceId} | Retrieve Virtual Instance |
VirtualInstancesApi | GetVirtualInstanceQueries | Get /v1/orgs/self/virtualinstances/{virtualInstanceId}/queries | List Queries |
VirtualInstancesApi | ListCollectionMounts | Get /v1/orgs/self/virtualinstances/{virtualInstanceId}/mounts | List Collection Mounts |
VirtualInstancesApi | ListVirtualInstances | Get /v1/orgs/self/virtualinstances | List Virtual Instances |
VirtualInstancesApi | MountCollection | Post /v1/orgs/self/virtualinstances/{virtualInstanceId}/mounts | Mount Collections |
VirtualInstancesApi | QueryVirtualInstance | Post /v1/orgs/self/virtualinstances/{virtualInstanceId}/queries | Execute SQL Query on a specific Virtual Instance |
VirtualInstancesApi | ResumeVirtualInstance | Post /v1/orgs/self/virtualinstances/{virtualInstanceId}/resume | Resume Virtual Instance |
VirtualInstancesApi | SetVirtualInstance | Post /v1/orgs/self/virtualinstances/{virtualInstanceId} | Update Virtual Instance |
VirtualInstancesApi | SuspendVirtualInstance | Post /v1/orgs/self/virtualinstances/{virtualInstanceId}/suspend | Suspend Virtual Instance |
VirtualInstancesApi | UnmountCollection | Delete /v1/orgs/self/virtualinstances/{virtualInstanceId}/mounts/{collectionPath} | Unmount Collection |
WorkspacesApi | CreateWorkspace | Post /v1/orgs/self/ws | Create Workspace |
WorkspacesApi | DeleteWorkspace | Delete /v1/orgs/self/ws/{workspace} | Delete Workspace |
WorkspacesApi | GetWorkspace | Get /v1/orgs/self/ws/{workspace} | Retrieve Workspace |
WorkspacesApi | ListWorkspaces | Get /v1/orgs/self/ws | List Workspaces |
Documentation For Models
- AddDocumentsRequest
- AddDocumentsResponse
- Alias
- ApiKey
- AsyncQueryOptions
- AutoScalingPolicy
- AwsAccessKey
- AwsRole
- AzureBlobStorageIntegration
- AzureEventHubsIntegration
- AzureServiceBusIntegration
- BulkStats
- CancelQueryResponse
- Cluster
- Collection
- CollectionMount
- CollectionMountResponse
- CollectionMountStats
- CollectionStats
- CreateAliasRequest
- CreateAliasResponse
- CreateApiKeyRequest
- CreateApiKeyResponse
- CreateCollectionMountRequest
- CreateCollectionMountsResponse
- CreateCollectionRequest
- CreateCollectionResponse
- CreateIntegrationRequest
- CreateIntegrationResponse
- CreateQueryLambdaRequest
- CreateQueryLambdaTagRequest
- CreateRoleRequest
- CreateScheduledLambdaRequest
- CreateUserRequest
- CreateUserResponse
- CreateViewRequest
- CreateViewResponse
- CreateVirtualInstanceRequest
- CreateVirtualInstanceResponse
- CreateWorkspaceRequest
- CreateWorkspaceResponse
- CsvParams
- DeleteAliasResponse
- DeleteApiKeyResponse
- DeleteCollectionResponse
- DeleteDocumentsRequest
- DeleteDocumentsRequestData
- DeleteDocumentsResponse
- DeleteIntegrationResponse
- DeleteQueryLambdaResponse
- DeleteSourceResponse
- DeleteUserResponse
- DeleteViewResponse
- DeleteVirtualInstanceResponse
- DeleteWorkspaceResponse
- DeploymentSettings
- DeploymentSettingsResponse
- DocumentStatus
- DynamodbIntegration
- ErrorModel
- EventTimeInfo
- ExecutePublicQueryLambdaRequest
- ExecuteQueryLambdaRequest
- ExecutionStatus
- FieldMappingQuery
- FieldMappingV2
- FieldPartition
- FormatParams
- GcpServiceAccount
- GcsIntegration
- GetAliasResponse
- GetApiKeyResponse
- GetCollectionCommit
- GetCollectionCommitData
- GetCollectionCommitRequest
- GetCollectionResponse
- GetIntegrationResponse
- GetQueryResponse
- GetSourceResponse
- GetViewResponse
- GetVirtualInstanceResponse
- GetWorkspaceResponse
- InputField
- Integration
- KafkaIntegration
- KafkaV3SecurityConfig
- KinesisIntegration
- ListAliasesResponse
- ListApiKeysResponse
- ListCollectionMountsResponse
- ListCollectionsResponse
- ListIntegrationsResponse
- ListQueriesResponse
- ListQueryLambdaTagsResponse
- ListQueryLambdaVersionsResponse
- ListQueryLambdasResponse
- ListRolesResponse
- ListSourcesResponse
- ListUnsubscribePreferencesResponse
- ListUsersResponse
- ListViewsResponse
- ListVirtualInstancesResponse
- ListWorkspacesResponse
- MongoDbIntegration
- Offsets
- Organization
- OrganizationResponse
- OutputField
- Pagination
- PaginationInfo
- PatchDocument
- PatchDocumentsRequest
- PatchDocumentsResponse
- PatchOperation
- Privilege
- QueryError
- QueryFieldType
- QueryInfo
- QueryLambda
- QueryLambdaSql
- QueryLambdaStats
- QueryLambdaTag
- QueryLambdaTagResponse
- QueryLambdaVersion
- QueryLambdaVersionResponse
- QueryPaginationResponse
- QueryParameter
- QueryRequest
- QueryRequestSql
- QueryResponse
- QueryResponseStats
- ResumeVirtualInstanceResponse
- Role
- RoleResponse
- S3Integration
- ScheduledLambda
- ScheduledLambdaResponse
- SchemaRegistryConfig
- SnowflakeIntegration
- Source
- SourceAzBlobStorageBase
- SourceAzBlobStorageSettings
- SourceAzureBlobStorage
- SourceAzureEventHubs
- SourceAzureServiceBus
- SourceBase
- SourceDynamoDb
- SourceDynamoDbBase
- SourceDynamoDbSettings
- SourceFileUpload
- SourceGcs
- SourceGcsBase
- SourceGcsSettings
- SourceKafka
- SourceKinesis
- SourceMongoDb
- SourceS3
- SourceS3Base
- SourceS3Settings
- SourceSnapshot
- SourceSnowflake
- SourceSystem
- SqlExpression
- Stats
- Status
- StatusAzureEventHubs
- StatusAzureEventHubsPartition
- StatusAzureServiceBus
- StatusAzureServiceBusSession
- StatusDynamoDb
- StatusDynamoDbV2
- StatusKafka
- StatusKafkaPartition
- StatusMongoDb
- StatusSnowflake
- SuspendSourceRequest
- SuspendVirtualInstanceResponse
- TLSConfig
- UnsubscribePreference
- UpdateAliasRequest
- UpdateApiKeyRequest
- UpdateApiKeyResponse
- UpdateCollectionRequest
- UpdateDeploymentSettingsRequest
- UpdateIntegrationRequest
- UpdateIntegrationResponse
- UpdateQueryLambdaRequest
- UpdateRoleRequest
- UpdateScheduledLambdaRequest
- UpdateUnsubscribePreferencesRequest
- UpdateUnsubscribePreferencesResponse
- UpdateUserRequest
- UpdateViewRequest
- UpdateViewResponse
- UpdateVirtualInstanceRequest
- UpdateVirtualInstanceResponse
- User
- ValidateQueryResponse
- View
- VirtualInstance
- VirtualInstanceStats
- Workspace
- XmlParams
Documentation For Authorization
Endpoints do not require authorization.
Documentation for Utility Methods
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat32
PtrFloat64
PtrString
PtrTime