Documentation
¶
Overview ¶
Package quickbase provides a Go SDK for the QuickBase API.
This SDK provides:
- Multiple authentication strategies (user token, temp token, SSO, ticket)
- Automatic retry with exponential backoff and jitter
- Proactive rate limiting with sliding window throttle
- Custom error types for different HTTP status codes
- Debug logging
- Date transformation (ISO strings to time.Time)
Authentication ¶
User token (recommended for server-side apps):
client, _ := quickbase.New("myrealm",
quickbase.WithUserToken("b9f3pk_xxxx_xxxxxxxxxxxxxxx"),
)
Ticket auth (username/password with proper createdBy/modifiedBy attribution):
client, _ := quickbase.New("myrealm",
quickbase.WithTicketAuth("[email protected]", "password"),
)
SSO/SAML (make API calls as a specific user):
client, _ := quickbase.New("myrealm",
quickbase.WithSSOTokenAuth(samlAssertion),
)
Temp token (for browser-initiated requests with tokens):
client, _ := quickbase.New("myrealm",
quickbase.WithTempTokens(map[string]string{"bqr1111": token}),
)
See the auth package for detailed documentation on each method.
Basic Usage ¶
client, err := quickbase.New("myrealm",
quickbase.WithUserToken("your-token"),
)
if err != nil {
log.Fatal(err)
}
// Use wrapper methods
app, _ := client.GetApp(ctx, "bqxyz123")
records, _ := client.RunQueryAll(ctx, quickbase.RunQueryBody{From: tableId})
// Or access the generated API directly for full control
resp, _ := client.API().GetAppWithResponse(ctx, appId)
Rate Limiting ¶
Proactive throttling (100 req/10s is QuickBase's limit):
client, _ := quickbase.New("myrealm",
quickbase.WithUserToken("token"),
quickbase.WithProactiveThrottle(100),
)
Rate limit callback:
client, _ := quickbase.New("myrealm",
quickbase.WithUserToken("token"),
quickbase.WithOnRateLimit(func(info quickbase.RateLimitInfo) {
log.Printf("Rate limited! Retry after %ds", info.RetryAfter)
}),
)
Index ¶
- Constants
- Variables
- func Fields(schema *Schema, table string, aliases ...string) *[]int
- func GroupBy(fieldIds ...int) *[]GroupByItem
- func Ints(ids ...int) *[]int
- func Ptr[T any](v T) *T
- func Strings(strs ...string) *[]string
- type AddManagersToGroupBuilder
- type AddMembersToGroupBuilder
- type AddSubgroupsToGroupBuilder
- type AuditBody
- type AuditBuilder
- type AuthenticationError
- type AuthorizationError
- type ChangesetSolutionBuilder
- type ChangesetSolutionFromRecordBuilder
- type Client
- type ClientWithResponses
- type CloneUserTokenBuilder
- type CopyAppBody
- type CopyAppBuilder
- type CreateAppBody
- type CreateAppBuilder
- type CreateFieldBody
- type CreateFieldBuilder
- type CreateFieldParams
- type CreateFieldResult
- type CreateRelationshipBody
- type CreateRelationshipBuilder
- type CreateSolutionBuilder
- type CreateSolutionFromRecordBuilder
- type CreateTableBody
- type CreateTableBuilder
- type CreateTableParams
- type DeactivateUserTokenBuilder
- type DeleteAppBody
- type DeleteAppBuilder
- type DeleteAppResult
- type DeleteFieldsBody
- type DeleteFieldsBuilder
- type DeleteFieldsParams
- type DeleteFieldsResult
- type DeleteFileBuilder
- type DeleteFileResult
- type DeleteRecordsBody
- type DeleteRecordsResult
- type DeleteRelationshipBuilder
- type DeleteTableBuilder
- type DeleteTableParams
- type DeleteTableResult
- type DeleteUserTokenBuilder
- type DenyUsersAndGroupsBuilder
- type DenyUsersBuilder
- type DownloadFileBuilder
- type Error
- type ExchangeSsoTokenBuilder
- type ExportSolutionBuilder
- type ExportSolutionToRecordBuilder
- type FieldInfo
- type FieldPermission
- type FieldType
- type FieldValue
- type FieldValueUnion
- type FormulaResult
- type GenerateDocumentBuilder
- type GetAppEvents200Type
- type GetAppEventsBuilder
- type GetAppEvents_200_Item
- type GetAppResult
- type GetAppTablesBuilder
- type GetAppTablesParams
- type GetAppTables_200_Item
- type GetFieldBuilder
- type GetFieldParams
- type GetFieldUsageBuilder
- type GetFieldUsageParams
- type GetFieldUsage_200_Field
- type GetFieldUsage_200_Item
- type GetFieldUsage_200_Usage
- type GetFieldsParams
- type GetFieldsResult
- type GetFieldsUsageBuilder
- type GetFieldsUsageParams
- type GetFieldsUsage_200_Field
- type GetFieldsUsage_200_Item
- type GetFieldsUsage_200_Usage
- type GetFields_200_Item
- type GetFields_200_Properties
- type GetRelationshipsBuilder
- type GetRelationshipsParams
- type GetRelationships_200_Relationships_ForeignKeyField
- type GetRelationships_200_Relationships_Item
- type GetRelationships_200_Relationships_LookupFields_Item
- type GetRelationships_200_Relationships_SummaryFields_Item
- type GetReportBuilder
- type GetReportParams
- type GetTableBuilder
- type GetTableParams
- type GetTableReportsBuilder
- type GetTableReportsParams
- type GetTableReports_200_Item
- type GetTableReports_200_Query
- type GetTempTokenDBIDBuilder
- type GetUsersBody
- type GetUsersBuilder
- type GetUsersParams
- type GroupByItem
- type MissingTokenError
- type NoOpThrottle
- type NotFoundError
- type Option
- func WithAppToken(token string) Option
- func WithBackoffMultiplier(m float64) Option
- func WithBaseURL(url string) Option
- func WithConvertDates(enabled bool) Option
- func WithDebug(enabled bool) Option
- func WithIdleConnTimeout(d time.Duration) Option
- func WithMaxIdleConns(n int) Option
- func WithMaxIdleConnsPerHost(n int) Option
- func WithMaxRetries(n int) Option
- func WithMaxRetryDelay(d time.Duration) Option
- func WithOnRateLimit(callback func(RateLimitInfo)) Option
- func WithOnRequest(callback func(RequestInfo)) Option
- func WithOnRetry(callback func(RetryInfo)) Option
- func WithProactiveThrottle(requestsPer10Seconds int) Option
- func WithReadOnly() Option
- func WithRetryDelay(d time.Duration) Option
- func WithSSOTokenAuth(samlToken string, opts ...auth.SSOTokenOption) Option
- func WithSchema(schema *Schema) Option
- func WithSchemaOptions(schema *Schema, opts SchemaOptions) Option
- func WithTempTokenAuth(opts ...auth.TempTokenOption) Optiondeprecated
- func WithTempTokens(tokens map[string]string) Option
- func WithThrottle(t client.Throttle) Option
- func WithTicket(ticket string) Option
- func WithTicketAuth(username, password string, opts ...auth.TicketOption) Option
- func WithTimeout(d time.Duration) Option
- func WithUserToken(token string) Option
- type PaginationMetadata
- type PaginationOptions
- type PaginationType
- type PlatformAnalyticEventSummariesBuilder
- type PlatformAnalyticReadsBuilder
- type QueryMetadata
- type QueryOptions
- type QuickbaseError
- type RateLimitError
- type RateLimitInfo
- type ReadOnlyError
- type Record
- type RelationshipInfo
- type RemoveManagersFromGroupBuilder
- type RemoveMembersFromGroupBuilder
- type RemoveSubgroupsFromGroupBuilder
- type ReportInfo
- type RequestInfo
- type ResolvedSchema
- type RetryInfo
- type RoleInfo
- type RunFormulaBody
- type RunFormulaBuilder
- type RunQueryBody
- type RunQueryResult
- type RunReportBody
- type RunReportBuilder
- type RunReportParams
- type RunReportResult
- type Schema
- type SchemaBuilder
- type SchemaError
- type SchemaFieldInfo
- type SchemaOptions
- type ServerError
- type SlidingWindowThrottle
- type SortByUnion
- type SortField
- type SortFieldOrder
- type SortSpec
- type TableInfo
- type TableSchema
- type Throttle
- type TimeoutError
- type TransferUserTokenBuilder
- type UndenyUsersBuilder
- type UpdateAppBody
- type UpdateAppBuilder
- type UpdateFieldBody
- type UpdateFieldBuilder
- type UpdateFieldParams
- type UpdateRelationshipBody
- type UpdateRelationshipBuilder
- type UpdateSolutionBuilder
- type UpdateSolutionToRecordBuilder
- type UpdateTableBody
- type UpdateTableBuilder
- type UpdateTableParams
- type UpsertBody
- type UpsertResult
- type ValidationError
Examples ¶
Constants ¶
const ( PaginationTypeSkip = client.PaginationTypeSkip PaginationTypeToken = client.PaginationTypeToken PaginationTypeNone = client.PaginationTypeNone )
Pagination type constants
const ( ASC = generated.SortFieldOrderASC DESC = generated.SortFieldOrderDESC )
Sort order constants for use with Sort().
Variables ¶
var ( // IsRetryableError returns true if the error should trigger a retry. IsRetryableError = core.IsRetryableError // ParseErrorResponse parses an HTTP response into an appropriate error type. ParseErrorResponse = core.ParseErrorResponse // IsISODateString checks if a string looks like an ISO 8601 date. IsISODateString = core.IsISODateString // ParseISODate parses an ISO 8601 date string to time.Time. ParseISODate = core.ParseISODate // TransformDates recursively transforms ISO date strings to time.Time in a map. TransformDates = core.TransformDates )
Helper functions re-exported from core
var ( // DetectPaginationType determines the pagination type from metadata. DetectPaginationType = client.DetectPaginationType // HasMorePages checks if a response has more pages available. HasMorePages = client.HasMorePages )
Pagination helper functions re-exported from client
var ( // ResolveSchema builds lookup maps from a schema definition. ResolveSchema = core.ResolveSchema // ResolveSchemaWithOptions builds lookup maps with custom options. ResolveSchemaWithOptions = core.ResolveSchemaWithOptions // ResolveTableAlias resolves a table alias to its ID. ResolveTableAlias = core.ResolveTableAlias // ResolveFieldAlias resolves a field alias to its ID. ResolveFieldAlias = core.ResolveFieldAlias // GetTableAlias returns the alias for a table ID. GetTableAlias = core.GetTableAlias // GetFieldAlias returns the alias for a field ID. GetFieldAlias = core.GetFieldAlias )
Schema resolution functions re-exported from core
Functions ¶
func Fields ¶ added in v1.3.0
Fields resolves field aliases to IDs for use in Select arrays. This allows using readable field names instead of numeric IDs.
Example:
schema := quickbase.NewSchema().
Table("projects", "bqxyz123").
Field("recordId", 3).
Field("name", 6).
Field("status", 7).
Build()
result, _ := client.RunQuery(ctx, quickbase.RunQueryBody{
From: "projects",
Select: quickbase.Fields(schema, "projects", "recordId", "name", "status"),
Where: quickbase.Ptr("{'status'.EX.'Active'}"),
})
Returns nil if schema is nil or if any alias cannot be resolved. For error details, use ResolveFieldAlias directly.
Example ¶
Use Fields helper to resolve field aliases to IDs.
schema := quickbase.NewSchema().
Table("projects", "bqxyz123").
Field("recordId", 3).
Field("name", 6).
Field("status", 7).
Build()
// Fields returns *[]int for use in Select
fieldIds := quickbase.Fields(schema, "projects", "recordId", "name", "status")
fmt.Printf("Field IDs: %v\n", *fieldIds)
Output: Field IDs: [3 6 7]
func GroupBy ¶ added in v1.3.0
func GroupBy(fieldIds ...int) *[]GroupByItem
GroupBy creates a groupBy array for RunQuery from field IDs.
Example:
result, _ := client.RunQuery(ctx, quickbase.RunQueryBody{
From: tableId,
GroupBy: quickbase.GroupBy(6, 7),
})
func Ints ¶ added in v1.1.0
Ints returns a pointer to a slice of ints. Useful for the Select field in RunQuery.
Example:
body := quickbase.RunQueryBody{
From: tableId,
Select: quickbase.Ints(3, 6, 7),
}
Example ¶
Use the Ints helper to create field ID slices for Select.
body := quickbase.RunQueryBody{
From: "bqxyz123",
Select: quickbase.Ints(3, 6, 7, 8, 9), // cleaner than &[]int{3, 6, 7, 8, 9}
}
_ = body
func Ptr ¶ added in v1.1.0
func Ptr[T any](v T) *T
Ptr returns a pointer to the given value. Useful for optional fields that require pointers.
Example:
body := quickbase.RunQueryBody{
From: tableId,
Where: quickbase.Ptr("{6.GT.100}"),
}
Example ¶
Use the Ptr helper to create pointers for optional fields.
// For optional string fields
where := quickbase.Ptr("{6.GT.100}")
// For optional int fields
skip := quickbase.Ptr(100)
_, _ = where, skip
Types ¶
type AddManagersToGroupBuilder ¶ added in v1.4.0
type AddManagersToGroupBuilder = client.AddManagersToGroupBuilder
AddManagersToGroupBuilder provides a fluent API for adding managers to groups.
type AddMembersToGroupBuilder ¶ added in v1.4.0
type AddMembersToGroupBuilder = client.AddMembersToGroupBuilder
AddMembersToGroupBuilder provides a fluent API for adding members to groups.
type AddSubgroupsToGroupBuilder ¶ added in v1.4.0
type AddSubgroupsToGroupBuilder = client.AddSubgroupsToGroupBuilder
AddSubgroupsToGroupBuilder provides a fluent API for adding subgroups to groups.
type AuditBody ¶ added in v1.1.0
type AuditBody = generated.AuditJSONRequestBody
AuditBody is the request body for Audit (get audit logs)
type AuditBuilder ¶ added in v1.4.0
type AuditBuilder = client.AuditBuilder
AuditBuilder provides a fluent API for querying audit logs.
type AuthenticationError ¶
type AuthenticationError = core.AuthenticationError
Re-export types for convenience
type AuthorizationError ¶
type AuthorizationError = core.AuthorizationError
Re-export types for convenience
type ChangesetSolutionBuilder ¶ added in v1.4.0
type ChangesetSolutionBuilder = client.ChangesetSolutionBuilder
ChangesetSolutionBuilder provides a fluent API for modifying solutions.
type ChangesetSolutionFromRecordBuilder ¶ added in v1.4.0
type ChangesetSolutionFromRecordBuilder = client.ChangesetSolutionFromRecordBuilder
ChangesetSolutionFromRecordBuilder provides a fluent API for solution changesets from records.
type Client ¶
Client is the main QuickBase API client.
func New ¶
New creates a new QuickBase client.
Example ¶
Create a basic client with user token authentication. This is the simplest and most common authentication method for server-side apps.
client, err := quickbase.New("myrealm",
quickbase.WithUserToken("b9f3pk_xxxx_xxxxxxxxxxxxxxx"),
)
if err != nil {
log.Fatal(err)
}
// Use client to make API calls
_ = client
Example (WithOptions) ¶
Configure a client with multiple options for production use.
client, err := quickbase.New("myrealm",
quickbase.WithUserToken("b9f3pk_xxxx_xxxxxxxxxxxxxxx"),
// Retry configuration
quickbase.WithMaxRetries(5),
quickbase.WithRetryDelay(time.Second),
quickbase.WithMaxRetryDelay(30*time.Second),
// Timeout
quickbase.WithTimeout(60*time.Second),
// Connection pool for high-throughput
quickbase.WithMaxIdleConnsPerHost(10),
// Proactive rate limiting
quickbase.WithProactiveThrottle(100),
)
if err != nil {
log.Fatal(err)
}
_ = client
type ClientWithResponses ¶
type ClientWithResponses = generated.ClientWithResponses
Generated client types
type CloneUserTokenBuilder ¶ added in v1.4.0
type CloneUserTokenBuilder = client.CloneUserTokenBuilder
CloneUserTokenBuilder provides a fluent API for cloning user tokens.
type CopyAppBody ¶ added in v1.1.0
type CopyAppBody = generated.CopyAppJSONRequestBody
CopyAppBody is the request body for CopyApp
type CopyAppBuilder ¶ added in v1.4.0
type CopyAppBuilder = client.CopyAppBuilder
CopyAppBuilder provides a fluent API for copying apps.
type CreateAppBody ¶ added in v1.1.0
type CreateAppBody = generated.CreateAppJSONRequestBody
CreateAppBody is the request body for CreateApp
type CreateAppBuilder ¶ added in v1.4.0
type CreateAppBuilder = client.CreateAppBuilder
CreateAppBuilder provides a fluent API for creating apps.
type CreateFieldBody ¶ added in v1.1.0
type CreateFieldBody = generated.CreateFieldJSONRequestBody
CreateFieldBody is the request body for CreateField
type CreateFieldBuilder ¶ added in v1.4.0
type CreateFieldBuilder = client.CreateFieldBuilder
CreateFieldBuilder provides a fluent API for creating fields.
type CreateFieldParams ¶ added in v1.1.0
type CreateFieldParams = generated.CreateFieldParams
CreateFieldParams are the parameters for CreateField
type CreateFieldResult ¶ added in v1.4.0
type CreateFieldResult = client.CreateFieldResult
CreateFieldResult contains the result of CreateField, UpdateField, GetField
type CreateRelationshipBody ¶ added in v1.1.0
type CreateRelationshipBody = generated.CreateRelationshipJSONRequestBody
CreateRelationshipBody is the request body for CreateRelationship
type CreateRelationshipBuilder ¶ added in v1.4.0
type CreateRelationshipBuilder = client.CreateRelationshipBuilder
CreateRelationshipBuilder provides a fluent API for creating relationships.
type CreateSolutionBuilder ¶ added in v1.4.0
type CreateSolutionBuilder = client.CreateSolutionBuilder
CreateSolutionBuilder provides a fluent API for creating solutions.
type CreateSolutionFromRecordBuilder ¶ added in v1.4.0
type CreateSolutionFromRecordBuilder = client.CreateSolutionFromRecordBuilder
CreateSolutionFromRecordBuilder provides a fluent API for creating solutions from records.
type CreateTableBody ¶ added in v1.1.0
type CreateTableBody = generated.CreateTableJSONRequestBody
CreateTableBody is the request body for CreateTable
type CreateTableBuilder ¶ added in v1.4.0
type CreateTableBuilder = client.CreateTableBuilder
CreateTableBuilder provides a fluent API for creating tables.
type CreateTableParams ¶ added in v1.1.0
type CreateTableParams = generated.CreateTableParams
CreateTableParams are the parameters for CreateTable
type DeactivateUserTokenBuilder ¶ added in v1.4.0
type DeactivateUserTokenBuilder = client.DeactivateUserTokenBuilder
DeactivateUserTokenBuilder provides a fluent API for deactivating user tokens.
type DeleteAppBody ¶ added in v1.1.0
type DeleteAppBody = generated.DeleteAppJSONRequestBody
DeleteAppBody is the request body for DeleteApp
type DeleteAppBuilder ¶ added in v1.4.0
type DeleteAppBuilder = client.DeleteAppBuilder
DeleteAppBuilder provides a fluent API for deleting apps.
type DeleteAppResult ¶ added in v1.4.0
type DeleteAppResult = client.DeleteAppResult
DeleteAppResult contains the result of DeleteApp
type DeleteFieldsBody ¶ added in v1.1.0
type DeleteFieldsBody = generated.DeleteFieldsJSONRequestBody
DeleteFieldsBody is the request body for DeleteFields
type DeleteFieldsBuilder ¶ added in v1.4.0
type DeleteFieldsBuilder = client.DeleteFieldsBuilder
DeleteFieldsBuilder provides a fluent API for deleting fields.
type DeleteFieldsParams ¶ added in v1.1.0
type DeleteFieldsParams = generated.DeleteFieldsParams
DeleteFieldsParams are the parameters for DeleteFields
type DeleteFieldsResult ¶ added in v1.4.0
type DeleteFieldsResult = client.DeleteFieldsResult
DeleteFieldsResult contains the result of DeleteFields
type DeleteFileBuilder ¶ added in v1.4.0
type DeleteFileBuilder = client.DeleteFileBuilder
DeleteFileBuilder provides a fluent API for deleting files.
type DeleteFileResult ¶ added in v1.4.0
type DeleteFileResult = client.DeleteFileResult
DeleteFileResult contains the result of DeleteFile
type DeleteRecordsBody ¶ added in v1.1.0
type DeleteRecordsBody = generated.DeleteRecordsJSONRequestBody
DeleteRecordsBody is the request body for DeleteRecords
type DeleteRecordsResult ¶ added in v1.1.0
type DeleteRecordsResult = client.DeleteRecordsResult
DeleteRecordsResult contains the result of a DeleteRecords call
type DeleteRelationshipBuilder ¶ added in v1.4.0
type DeleteRelationshipBuilder = client.DeleteRelationshipBuilder
DeleteRelationshipBuilder provides a fluent API for deleting relationships.
type DeleteTableBuilder ¶ added in v1.4.0
type DeleteTableBuilder = client.DeleteTableBuilder
DeleteTableBuilder provides a fluent API for deleting tables.
type DeleteTableParams ¶ added in v1.1.0
type DeleteTableParams = generated.DeleteTableParams
DeleteTableParams are the parameters for DeleteTable
type DeleteTableResult ¶ added in v1.4.0
type DeleteTableResult = client.DeleteTableResult
DeleteTableResult contains the result of DeleteTable
type DeleteUserTokenBuilder ¶ added in v1.4.0
type DeleteUserTokenBuilder = client.DeleteUserTokenBuilder
DeleteUserTokenBuilder provides a fluent API for deleting user tokens.
type DenyUsersAndGroupsBuilder ¶ added in v1.4.0
type DenyUsersAndGroupsBuilder = client.DenyUsersAndGroupsBuilder
DenyUsersAndGroupsBuilder provides a fluent API for denying users and groups.
type DenyUsersBuilder ¶ added in v1.4.0
type DenyUsersBuilder = client.DenyUsersBuilder
DenyUsersBuilder provides a fluent API for denying users.
type DownloadFileBuilder ¶ added in v1.4.0
type DownloadFileBuilder = client.DownloadFileBuilder
DownloadFileBuilder provides a fluent API for downloading files.
type ExchangeSsoTokenBuilder ¶ added in v1.4.0
type ExchangeSsoTokenBuilder = client.ExchangeSsoTokenBuilder
ExchangeSsoTokenBuilder provides a fluent API for exchanging SSO tokens.
type ExportSolutionBuilder ¶ added in v1.4.0
type ExportSolutionBuilder = client.ExportSolutionBuilder
ExportSolutionBuilder provides a fluent API for exporting solutions.
type ExportSolutionToRecordBuilder ¶ added in v1.4.0
type ExportSolutionToRecordBuilder = client.ExportSolutionToRecordBuilder
ExportSolutionToRecordBuilder provides a fluent API for exporting solutions to records.
type FieldPermission ¶ added in v1.4.0
type FieldPermission = client.FieldPermission
FieldPermission represents a role's permission on a field
type FieldType ¶ added in v1.1.0
type FieldType = generated.CreateFieldJSONBodyFieldType
FieldType is the type of a field for CreateField
const ( FieldTypeText FieldType = "text" FieldTypeMultiText FieldType = "text-multi-line" FieldTypeRichText FieldType = "rich-text" FieldTypeNumber FieldType = "numeric" FieldTypeCurrency FieldType = "currency" FieldTypePercent FieldType = "percent" FieldTypeRating FieldType = "rating" FieldTypeDate FieldType = "date" FieldTypeDateTime FieldType = "datetime" FieldTypeTimeOfDay FieldType = "timeofday" FieldTypeDuration FieldType = "duration" FieldTypeCheckbox FieldType = "checkbox" FieldTypeEmail FieldType = "email" FieldTypePhone FieldType = "phone" FieldTypeURL FieldType = "url" FieldTypeAddress FieldType = "address" FieldTypeFile FieldType = "file" FieldTypeUser FieldType = "user" FieldTypeMultiUser FieldType = "multiuser" )
Field type constants
type FieldValue ¶ added in v1.1.0
type FieldValue = generated.FieldValue
FieldValue is a field value in a record
func Value ¶ added in v1.3.0
func Value(v any) FieldValue
Value creates a FieldValue for use in record upserts. It accepts string, int, float, bool, or []string values.
This helper hides the complexity of Go's lack of union types. The QuickBase API allows field values to be different types (text, number, boolean, multi-select), and oapi-codegen generates verbose wrapper types to handle this. Value() provides a clean interface.
Example:
data := []quickbase.Record{
{
"name": quickbase.Value("Alice"),
"age": quickbase.Value(30),
"active": quickbase.Value(true),
"tags": quickbase.Value([]string{"a", "b"}),
},
}
client.Upsert(ctx, quickbase.UpsertBody{
To: "projects",
Data: &data,
})
type FieldValueUnion ¶ added in v1.1.0
type FieldValueUnion = generated.FieldValue_Value
FieldValueUnion is the union type for field values
type FormulaResult ¶ added in v1.4.0
type FormulaResult = client.FormulaResult
FormulaResult contains the result of RunFormula
type GenerateDocumentBuilder ¶ added in v1.4.0
type GenerateDocumentBuilder = client.GenerateDocumentBuilder
GenerateDocumentBuilder provides a fluent API for generating documents.
type GetAppEvents200Type ¶ added in v1.9.1
type GetAppEvents200Type = generated.GetAppEvents200Type
Nested response types (for accessing Raw API response data)
type GetAppEventsBuilder ¶ added in v1.4.0
type GetAppEventsBuilder = client.GetAppEventsBuilder
GetAppEventsBuilder provides a fluent API for getting app events.
type GetAppEvents_200_Item ¶ added in v1.9.1
type GetAppEvents_200_Item = generated.GetAppEvents_200_Item
Event types
type GetAppResult ¶ added in v1.1.0
type GetAppResult = client.GetAppResult
GetAppResult contains the result of GetApp, CreateApp, UpdateApp, CopyApp
type GetAppTablesBuilder ¶ added in v1.4.0
type GetAppTablesBuilder = client.GetAppTablesBuilder
GetAppTablesBuilder provides a fluent API for getting app tables.
type GetAppTablesParams ¶ added in v1.1.0
type GetAppTablesParams = generated.GetAppTablesParams
GetAppTablesParams are the parameters for GetAppTables
type GetAppTables_200_Item ¶ added in v1.9.1
type GetAppTables_200_Item = generated.GetAppTables_200_Item
Table types
type GetFieldBuilder ¶ added in v1.4.0
type GetFieldBuilder = client.GetFieldBuilder
GetFieldBuilder provides a fluent API for getting a field.
type GetFieldParams ¶ added in v1.1.0
type GetFieldParams = generated.GetFieldParams
GetFieldParams are the parameters for GetField
type GetFieldUsageBuilder ¶ added in v1.4.0
type GetFieldUsageBuilder = client.GetFieldUsageBuilder
GetFieldUsageBuilder provides a fluent API for getting field usage.
type GetFieldUsageParams ¶ added in v1.9.1
type GetFieldUsageParams = generated.GetFieldUsageParams
GetFieldUsageParams are the parameters for GetFieldUsage
type GetFieldUsage_200_Field ¶ added in v1.9.1
type GetFieldUsage_200_Field = generated.GetFieldUsage_200_Field
Nested response types (for accessing Raw API response data)
type GetFieldUsage_200_Item ¶ added in v1.9.1
type GetFieldUsage_200_Item = generated.GetFieldUsage_200_Item
Nested response types (for accessing Raw API response data)
type GetFieldUsage_200_Usage ¶ added in v1.9.1
type GetFieldUsage_200_Usage = generated.GetFieldUsage_200_Usage
Nested response types (for accessing Raw API response data)
type GetFieldsParams ¶ added in v1.1.0
type GetFieldsParams = generated.GetFieldsParams
GetFieldsParams are the parameters for GetFields
type GetFieldsResult ¶ added in v1.4.0
type GetFieldsResult = client.GetFieldsResult
GetFieldsResult wraps the getFields response with helper methods
type GetFieldsUsageBuilder ¶ added in v1.4.0
type GetFieldsUsageBuilder = client.GetFieldsUsageBuilder
GetFieldsUsageBuilder provides a fluent API for getting fields usage.
type GetFieldsUsageParams ¶ added in v1.9.1
type GetFieldsUsageParams = generated.GetFieldsUsageParams
GetFieldsUsageParams are the parameters for GetFieldsUsage
type GetFieldsUsage_200_Field ¶ added in v1.9.1
type GetFieldsUsage_200_Field = generated.GetFieldsUsage_200_Field
Nested response types (for accessing Raw API response data)
type GetFieldsUsage_200_Item ¶ added in v1.9.1
type GetFieldsUsage_200_Item = generated.GetFieldsUsage_200_Item
Field usage types
type GetFieldsUsage_200_Usage ¶ added in v1.9.1
type GetFieldsUsage_200_Usage = generated.GetFieldsUsage_200_Usage
Nested response types (for accessing Raw API response data)
type GetFields_200_Item ¶ added in v1.9.1
type GetFields_200_Item = generated.GetFields_200_Item
Field types
type GetFields_200_Properties ¶ added in v1.9.1
type GetFields_200_Properties = generated.GetFields_200_Properties
Nested response types (for accessing Raw API response data)
type GetRelationshipsBuilder ¶ added in v1.4.0
type GetRelationshipsBuilder = client.GetRelationshipsBuilder
GetRelationshipsBuilder provides a fluent API for getting relationships.
type GetRelationshipsParams ¶ added in v1.1.0
type GetRelationshipsParams = generated.GetRelationshipsParams
GetRelationshipsParams are the parameters for GetRelationships
type GetRelationships_200_Relationships_ForeignKeyField ¶ added in v1.9.1
type GetRelationships_200_Relationships_ForeignKeyField = generated.GetRelationships_200_Relationships_ForeignKeyField
Nested response types (for accessing Raw API response data)
type GetRelationships_200_Relationships_Item ¶ added in v1.9.1
type GetRelationships_200_Relationships_Item = generated.GetRelationships_200_Relationships_Item
Relationship types
type GetRelationships_200_Relationships_LookupFields_Item ¶ added in v1.9.1
type GetRelationships_200_Relationships_LookupFields_Item = generated.GetRelationships_200_Relationships_LookupFields_Item
Nested response types (for accessing Raw API response data)
type GetRelationships_200_Relationships_SummaryFields_Item ¶ added in v1.9.1
type GetRelationships_200_Relationships_SummaryFields_Item = generated.GetRelationships_200_Relationships_SummaryFields_Item
Nested response types (for accessing Raw API response data)
type GetReportBuilder ¶ added in v1.4.0
type GetReportBuilder = client.GetReportBuilder
GetReportBuilder provides a fluent API for getting a report.
type GetReportParams ¶ added in v1.1.0
type GetReportParams = generated.GetReportParams
GetReportParams are the parameters for GetReport
type GetTableBuilder ¶ added in v1.4.0
type GetTableBuilder = client.GetTableBuilder
GetTableBuilder provides a fluent API for getting a table.
type GetTableParams ¶ added in v1.1.0
type GetTableParams = generated.GetTableParams
GetTableParams are the parameters for GetTable
type GetTableReportsBuilder ¶ added in v1.4.0
type GetTableReportsBuilder = client.GetTableReportsBuilder
GetTableReportsBuilder provides a fluent API for getting table reports.
type GetTableReportsParams ¶ added in v1.1.0
type GetTableReportsParams = generated.GetTableReportsParams
GetTableReportsParams are the parameters for GetTableReports
type GetTableReports_200_Item ¶ added in v1.9.1
type GetTableReports_200_Item = generated.GetTableReports_200_Item
Report types
type GetTableReports_200_Query ¶ added in v1.9.1
type GetTableReports_200_Query = generated.GetTableReports_200_Query
Nested response types (for accessing Raw API response data)
type GetTempTokenDBIDBuilder ¶ added in v1.4.0
type GetTempTokenDBIDBuilder = client.GetTempTokenDBIDBuilder
GetTempTokenDBIDBuilder provides a fluent API for getting temp tokens.
type GetUsersBody ¶ added in v1.1.0
type GetUsersBody = generated.GetUsersJSONRequestBody
GetUsersBody is the request body for GetUsers
type GetUsersBuilder ¶ added in v1.4.0
type GetUsersBuilder = client.GetUsersBuilder
GetUsersBuilder provides a fluent API for getting users.
type GetUsersParams ¶ added in v1.1.0
type GetUsersParams = generated.GetUsersParams
GetUsersParams are the parameters for GetUsers
type GroupByItem ¶ added in v1.3.0
type GroupByItem = generated.RunQueryJSONBody_GroupBy_Item
GroupByItem is an alias for the verbose generated type.
type MissingTokenError ¶ added in v1.3.0
type MissingTokenError = core.MissingTokenError
Re-export types for convenience
type NoOpThrottle ¶
type NoOpThrottle = client.NoOpThrottle
Re-export types for convenience
func NewNoOpThrottle ¶
func NewNoOpThrottle() *NoOpThrottle
NewNoOpThrottle creates a no-op throttle.
type Option ¶
type Option func(*clientConfig)
Option configures a Client.
func WithAppToken ¶ added in v1.5.0
WithAppToken sets an application token for XML API calls.
App tokens are only needed for the XML API when:
- The app has "Require Application Tokens" enabled, AND
- You're NOT using user token authentication (which bypasses app token checks)
Common scenarios requiring app tokens:
- Using ticket auth (WithTicketAuth) with XML API methods
- Using temp tokens (WithTempTokens) with XML API methods
The JSON API does not use app tokens - user tokens and temp tokens provide sufficient authentication. This option only affects XML API calls made via the xml sub-package.
Example:
client, _ := quickbase.New("myrealm",
quickbase.WithTicketAuth("[email protected]", "password"),
quickbase.WithAppToken("your-app-token"),
)
// XML API calls will include the app token
xmlClient := xml.New(client)
roles, _ := xmlClient.GetRoleInfo(ctx, appId)
func WithBackoffMultiplier ¶
WithBackoffMultiplier sets the exponential backoff multiplier.
func WithConvertDates ¶
WithConvertDates enables/disables automatic ISO date string conversion.
func WithIdleConnTimeout ¶ added in v1.2.0
WithIdleConnTimeout sets how long idle connections stay in the pool. Default is 90 seconds.
func WithMaxIdleConns ¶ added in v1.2.0
WithMaxIdleConns sets the maximum number of idle connections across all hosts. Default is 100. This controls total connection pool size.
func WithMaxIdleConnsPerHost ¶ added in v1.2.0
WithMaxIdleConnsPerHost sets maximum idle connections to QuickBase (default 6). The default of 6 matches browser standards and handles typical concurrency. For heavy batch operations, consider 10-20 alongside WithProactiveThrottle.
Example ¶
Configure connection pool for high-throughput batch operations.
client, _ := quickbase.New("myrealm",
quickbase.WithUserToken("token"),
// Allow 10 concurrent connections (default is 6)
quickbase.WithMaxIdleConnsPerHost(10),
// Pair with throttling for safe high-throughput
quickbase.WithProactiveThrottle(100),
)
_ = client
func WithMaxRetries ¶
WithMaxRetries sets the maximum number of retry attempts.
func WithMaxRetryDelay ¶
WithMaxRetryDelay sets the maximum delay between retries.
func WithOnRateLimit ¶
func WithOnRateLimit(callback func(RateLimitInfo)) Option
WithOnRateLimit sets a callback for rate limit events.
Example ¶
Get notified when rate limited by QuickBase.
client, _ := quickbase.New("myrealm",
quickbase.WithUserToken("token"),
quickbase.WithOnRateLimit(func(info quickbase.RateLimitInfo) {
fmt.Printf("Rate limited! Retry after %d seconds (Ray ID: %s)\n",
info.RetryAfter,
info.QBAPIRay,
)
}),
)
_ = client
func WithOnRequest ¶ added in v1.2.0
func WithOnRequest(callback func(RequestInfo)) Option
WithOnRequest sets a callback that fires after every API request completes. Use this for monitoring request latency, status codes, and errors.
Example:
quickbase.WithOnRequest(func(info quickbase.RequestInfo) {
log.Printf("%s %s → %d (%v)", info.Method, info.Path, info.StatusCode, info.Duration)
})
Example ¶
Monitor all API requests for latency tracking and debugging.
client, _ := quickbase.New("myrealm",
quickbase.WithUserToken("token"),
quickbase.WithOnRequest(func(info quickbase.RequestInfo) {
fmt.Printf("%s %s → %d (%dms)\n",
info.Method,
info.Path,
info.StatusCode,
info.Duration.Milliseconds(),
)
// Debug failed requests by inspecting the body
if info.StatusCode >= 400 {
fmt.Printf("Request body: %s\n", info.RequestBody)
}
}),
)
_ = client
func WithOnRetry ¶ added in v1.2.0
WithOnRetry sets a callback that fires before each retry attempt. Use this for monitoring retry behavior and debugging transient failures.
Example:
quickbase.WithOnRetry(func(info quickbase.RetryInfo) {
log.Printf("Retrying %s %s (attempt %d, reason: %s)", info.Method, info.Path, info.Attempt, info.Reason)
})
Example ¶
Track retry attempts for debugging transient failures.
client, _ := quickbase.New("myrealm",
quickbase.WithUserToken("token"),
quickbase.WithOnRetry(func(info quickbase.RetryInfo) {
fmt.Printf("Retrying %s %s (attempt %d, reason: %s, wait: %v)\n",
info.Method,
info.Path,
info.Attempt,
info.Reason,
info.WaitTime,
)
}),
)
_ = client
func WithProactiveThrottle ¶
WithProactiveThrottle enables sliding window throttling. QuickBase's limit is 100 requests per 10 seconds per user token.
Example ¶
Enable proactive throttling to avoid 429 errors. QuickBase allows 100 requests per 10 seconds per user token.
client, _ := quickbase.New("myrealm",
quickbase.WithUserToken("token"),
quickbase.WithProactiveThrottle(100), // 100 req/10s
)
_ = client
func WithReadOnly ¶ added in v1.4.0
func WithReadOnly() Option
WithReadOnly enables read-only mode, blocking all write operations.
When enabled, any attempt to make a write request returns a ReadOnlyError:
- JSON API: POST, PUT, DELETE, PATCH methods are blocked
- JSON API: GET endpoints that modify data are also blocked (GenerateDocument, CreateSolutionFromRecord, UpdateSolutionFromRecord, ExportSolutionToRecord)
- XML API: Write actions like API_AddUserToRole, API_SetDBVar, etc. are blocked
This is useful for data extraction tools, reporting systems, or any context where you want to ensure the client can only read data, never modify it.
Example:
client, _ := quickbase.New("myrealm",
quickbase.WithUserToken(token),
quickbase.WithReadOnly(),
)
// These work:
app, _ := client.GetApp("bqxyz123").Run(ctx)
fields, _ := client.GetFields("bqtable").Run(ctx)
// These fail with ReadOnlyError:
_, err := client.Upsert("bqtable").Data(records).Run(ctx)
// err = &ReadOnlyError{Method: "POST", Path: "/v1/records"}
// XML API writes are also blocked:
err = xmlClient.AddUserToRole(ctx, appId, "[email protected]", 10)
// err = &ReadOnlyError{Method: "POST", Path: "/db/...", Action: "API_AddUserToRole"}
func WithRetryDelay ¶
WithRetryDelay sets the initial delay between retries.
func WithSSOTokenAuth ¶
func WithSSOTokenAuth(samlToken string, opts ...auth.SSOTokenOption) Option
WithSSOTokenAuth configures SSO (SAML) token authentication.
SSO authentication lets your Go server make API calls as a specific QuickBase user rather than a shared service account. The SDK exchanges a SAML assertion for a QuickBase temp token using RFC 8693 token exchange.
Benefits:
- Audit accuracy: "Created By" and "Modified By" show the actual user
- Security: No long-lived user token; each user gets a short-lived token
- Per-user permissions: API calls respect each user's individual QuickBase permissions
Prerequisites:
- Your QuickBase realm has SAML SSO configured
- Your identity provider (Okta, Azure AD, etc.) can generate SAML assertions
Example:
// Get SAML assertion from your IdP for the authenticated user
samlAssertion := getAssertionFromIdP(userId) // base64url-encoded
client, err := quickbase.New("myrealm",
quickbase.WithSSOTokenAuth(samlAssertion),
)
// API calls are now made as that specific user
See https://developer.quickbase.com/operation/exchangeSsoToken
Example ¶
Authenticate using a SAML assertion for SSO. This allows API calls to be made as a specific QuickBase user.
// Get SAML assertion from your identity provider (Okta, Azure AD, etc.)
samlAssertion := "base64url-encoded-saml-assertion"
client, err := quickbase.New("myrealm",
quickbase.WithSSOTokenAuth(samlAssertion),
)
if err != nil {
log.Fatal(err)
}
// API calls now execute as the authenticated SSO user.
// "Created By" and "Modified By" fields will show their name.
_ = client
func WithSchema ¶ added in v1.3.0
WithSchema sets the schema for table and field aliases.
When configured, the client automatically:
- Transforms table aliases to IDs in requests (from, to fields)
- Transforms field aliases to IDs in requests (select, sortBy, groupBy, where, data)
- Transforms field IDs to aliases in responses
- Unwraps { value: X } to just X in response records
Example with struct:
schema := &quickbase.Schema{
Tables: map[string]quickbase.TableSchema{
"projects": {
ID: "bqw3ryzab",
Fields: map[string]int{
"id": 3,
"name": 6,
"status": 7,
},
},
},
}
Example with builder:
schema := quickbase.NewSchema().
Table("projects", "bqw3ryzab").
Field("id", 3).
Field("name", 6).
Field("status", 7).
Build()
client, _ := quickbase.New("myrealm",
quickbase.WithUserToken("token"),
quickbase.WithSchema(schema),
)
// Now use aliases in queries
result, _ := client.RunQuery(ctx, quickbase.RunQueryBody{
From: "projects", // alias instead of "bqw3ryzab"
Select: quickbase.Fields(schema, "projects", "name", "status"), // aliases for select
Where: quickbase.Ptr("{'status'.EX.'Active'}"), // aliases in where
})
Example ¶
Use schema aliases for readable table and field names.
// Define schema with readable names
schema := quickbase.NewSchema().
Table("projects", "bqxyz123").
Field("recordId", 3).
Field("name", 6).
Field("status", 7).
Build()
client, _ := quickbase.New("myrealm",
quickbase.WithUserToken("token"),
quickbase.WithSchema(schema),
)
ctx := context.Background()
result, _ := client.RunQuery(ctx, quickbase.RunQueryBody{
From: "projects", // alias instead of "bqxyz123"
Select: quickbase.Fields(schema, "projects", "name", "status"), // aliases for select
Where: quickbase.Ptr("{'status'.EX.'Active'}"), // aliases in where
})
// Response data uses aliases too
for _, record := range result.Data {
fmt.Printf("Name: %v, Status: %v\n", record["name"], record["status"])
}
func WithSchemaOptions ¶ added in v1.3.0
func WithSchemaOptions(schema *Schema, opts SchemaOptions) Option
WithSchemaOptions sets the schema with custom options. Use this to control schema behavior, such as disabling response transformation.
Example:
quickbase.WithSchemaOptions(schema, quickbase.SchemaOptions{
TransformResponses: false, // Keep field IDs in responses
})
func WithTempTokenAuth
deprecated
func WithTempTokenAuth(opts ...auth.TempTokenOption) Option
WithTempTokenAuth configures temporary token authentication.
Temp tokens are short-lived (~5 min), table-scoped tokens that verify a user is logged into QuickBase. Go servers receive these tokens from browser clients (e.g., Code Pages) that can fetch them using the user's browser session.
For the simpler map-based API, see WithTempTokens.
Deprecated: Use WithTempTokens instead for clearer token-to-table mapping.
Example ¶
Handle temp tokens received from browser clients (e.g., Code Pages via Datastar). The browser fetches tokens using its QuickBase session and sends them to your server.
// Tokens are received from browser via HTTP headers, e.g.:
// token := r.Header.Get("X-QB-Token-bqr1111")
tempToken := "token-from-browser"
client, err := quickbase.New("myrealm",
quickbase.WithTempTokenAuth(
auth.WithInitialTempToken(tempToken),
),
)
if err != nil {
log.Fatal(err)
}
// Use the client to make API calls to QuickBase
_ = client
func WithTempTokens ¶ added in v1.3.0
WithTempTokens configures temporary token authentication with a map of tokens.
This is the preferred way to configure temp token auth when you have tokens mapped to table IDs (dbids).
Example:
client, err := quickbase.New("myrealm",
quickbase.WithTempTokens(map[string]string{
"bqxyz123": tokenForTable1,
"bqabc456": tokenForTable2,
}),
)
func WithThrottle ¶
WithThrottle sets a custom throttle implementation.
func WithTicket ¶ added in v1.3.0
WithTicket configures authentication using a pre-existing ticket.
Use this when the ticket was obtained elsewhere (e.g., by a browser client calling API_Authenticate directly). The server never sees user credentials.
This is the recommended approach for Code Page cookie mode:
- Browser calls QuickBase API_Authenticate with user credentials
- Browser sends ticket to Go server
- Server stores encrypted ticket in HttpOnly cookie
- Server uses WithTicket for API calls
Example:
qb, err := quickbase.New("myrealm",
quickbase.WithTicket(ticketFromCookie),
)
XML-API-TICKET: Remove this function if XML API is discontinued.
func WithTicketAuth ¶ added in v1.2.0
func WithTicketAuth(username, password string, opts ...auth.TicketOption) Option
WithTicketAuth configures ticket authentication using username/password.
This calls the XML API_Authenticate endpoint to obtain a ticket, which is then used with REST API calls. Unlike user tokens, tickets properly attribute record changes (createdBy/modifiedBy) to the authenticated user.
The password is used once for authentication and then discarded from memory. When the ticket expires (default 12 hours), an AuthenticationError is returned and a new client must be created with fresh credentials.
Example:
qb, err := quickbase.New("myrealm",
quickbase.WithTicketAuth("[email protected]", "password"),
)
With custom ticket validity (max ~6 months):
qb, err := quickbase.New("myrealm",
quickbase.WithTicketAuth("[email protected]", "password",
auth.WithTicketHours(24*7), // 1 week
),
)
XML-API-TICKET: Remove this function if XML API is discontinued.
Example ¶
Authenticate with username/password using ticket authentication. Unlike user tokens, tickets properly attribute record changes (createdBy/modifiedBy) to the authenticated user.
client, err := quickbase.New("myrealm",
quickbase.WithTicketAuth("[email protected]", "password"),
)
if err != nil {
log.Fatal(err)
}
// The password is discarded after first authentication.
// Tickets are valid for 12 hours by default.
_ = client
Example (CustomHours) ¶
Configure ticket authentication with custom validity period.
client, err := quickbase.New("myrealm",
quickbase.WithTicketAuth("[email protected]", "password",
auth.WithTicketHours(24*7), // Valid for 1 week
),
)
if err != nil {
log.Fatal(err)
}
_ = client
func WithUserToken ¶
WithUserToken configures user token authentication.
type PaginationOptions ¶
type PaginationOptions = client.PaginationOptions
Re-export types for convenience
type PlatformAnalyticEventSummariesBuilder ¶ added in v1.4.0
type PlatformAnalyticEventSummariesBuilder = client.PlatformAnalyticEventSummariesBuilder
PlatformAnalyticEventSummariesBuilder provides a fluent API for platform analytics.
type PlatformAnalyticReadsBuilder ¶ added in v1.4.0
type PlatformAnalyticReadsBuilder = client.PlatformAnalyticReadsBuilder
PlatformAnalyticReadsBuilder provides a fluent API for platform analytic reads.
type QueryMetadata ¶ added in v1.1.0
type QueryMetadata = client.QueryMetadata
QueryMetadata contains pagination metadata from a query
type QueryOptions ¶ added in v1.1.0
type QueryOptions = generated.RunQueryJSONBody_Options
QueryOptions contains pagination and other options for RunQuery
func Options ¶ added in v1.3.0
func Options(top, skip int) *QueryOptions
Options creates a QueryOptions with top (limit) and skip (offset). Pass -1 for either value to omit it.
Example:
result, _ := client.RunQuery(ctx, quickbase.RunQueryBody{
From: tableId,
Options: quickbase.Options(100, 0), // top=100, skip=0
})
// Skip only:
quickbase.Options(-1, 50) // skip=50, no top limit
type ReadOnlyError ¶ added in v1.4.0
type ReadOnlyError = core.ReadOnlyError
Re-export types for convenience
type Record ¶ added in v1.1.0
type Record = generated.QuickbaseRecord
Record is a QuickBase record (map of field ID to value)
func Row ¶ added in v1.3.0
Row creates a Record from alternating key-value pairs. Keys can be field IDs (int) or field aliases (string). Values are automatically wrapped using Value().
This provides a concise way to create records for upserts without manually wrapping each value.
Example:
data := []quickbase.Record{
quickbase.Row("name", "Alice", "age", 30, "active", true),
quickbase.Row("name", "Bob", "age", 25, "active", false),
}
client.Upsert(ctx, quickbase.UpsertBody{
To: "projects",
Data: &data,
})
With numeric field IDs:
quickbase.Row(6, "Alice", 7, 30)
type RelationshipInfo ¶ added in v1.4.0
type RelationshipInfo = client.RelationshipInfo
RelationshipInfo contains the result of CreateRelationship, UpdateRelationship
type RemoveManagersFromGroupBuilder ¶ added in v1.4.0
type RemoveManagersFromGroupBuilder = client.RemoveManagersFromGroupBuilder
RemoveManagersFromGroupBuilder provides a fluent API for removing managers from groups.
type RemoveMembersFromGroupBuilder ¶ added in v1.4.0
type RemoveMembersFromGroupBuilder = client.RemoveMembersFromGroupBuilder
RemoveMembersFromGroupBuilder provides a fluent API for removing members from groups.
type RemoveSubgroupsFromGroupBuilder ¶ added in v1.4.0
type RemoveSubgroupsFromGroupBuilder = client.RemoveSubgroupsFromGroupBuilder
RemoveSubgroupsFromGroupBuilder provides a fluent API for removing subgroups from groups.
type ReportInfo ¶ added in v1.4.0
type ReportInfo = client.ReportInfo
ReportInfo contains the result of GetReport, GetTableReports
type ResolvedSchema ¶ added in v1.3.0
type ResolvedSchema = core.ResolvedSchema
Re-export types for convenience
type RoleInfo ¶ added in v1.4.0
RoleInfo contains basic role information extracted from field permissions
type RunFormulaBody ¶ added in v1.1.0
type RunFormulaBody = generated.RunFormulaJSONRequestBody
RunFormulaBody is the request body for RunFormula
type RunFormulaBuilder ¶ added in v1.4.0
type RunFormulaBuilder = client.RunFormulaBuilder
RunFormulaBuilder provides a fluent API for running formulas.
type RunQueryBody ¶ added in v1.1.0
type RunQueryBody = generated.RunQueryJSONRequestBody
RunQueryBody is the request body for RunQuery
type RunQueryResult ¶ added in v1.1.0
type RunQueryResult = client.RunQueryResult
RunQueryResult contains the result of a RunQuery call
type RunReportBody ¶ added in v1.1.0
type RunReportBody = generated.RunReportJSONRequestBody
RunReportBody is the request body for RunReport
type RunReportBuilder ¶ added in v1.4.0
type RunReportBuilder = client.RunReportBuilder
RunReportBuilder provides a fluent API for running reports.
type RunReportParams ¶ added in v1.1.0
type RunReportParams = generated.RunReportParams
RunReportParams are the parameters for RunReport
type RunReportResult ¶ added in v1.4.0
type RunReportResult = client.RunReportResult
RunReportResult contains the result of a RunReport call
type SchemaBuilder ¶ added in v1.3.0
type SchemaBuilder = core.SchemaBuilder
Re-export types for convenience
func NewSchema ¶ added in v1.3.0
func NewSchema() *SchemaBuilder
NewSchema creates a new SchemaBuilder for fluent schema definition.
Example:
schema := quickbase.NewSchema().
Table("projects", "bqxyz123").
Field("recordId", 3).
Field("name", 6).
Field("status", 7).
Table("tasks", "bqabc456").
Field("recordId", 3).
Field("title", 6).
Build()
Example ¶
Build schema using the fluent builder API.
schema := quickbase.NewSchema().
Table("projects", "bqxyz123").
Field("recordId", 3).
Field("name", 6).
Field("status", 7).
Table("tasks", "bqabc456").
Field("recordId", 3).
Field("title", 8).
Field("projectId", 9).
Build()
fmt.Printf("Tables: %d\n", len(schema.Tables))
Output: Tables: 2
type SchemaError ¶ added in v1.3.0
type SchemaError = core.SchemaError
Re-export types for convenience
type SchemaFieldInfo ¶ added in v1.4.0
type SchemaFieldInfo = client.SchemaFieldInfo
SchemaFieldInfo contains comprehensive field information for schema discovery
type SchemaOptions ¶ added in v1.3.0
type SchemaOptions = core.SchemaOptions
Re-export types for convenience
func DefaultSchemaOptions ¶ added in v1.3.0
func DefaultSchemaOptions() SchemaOptions
DefaultSchemaOptions returns the default schema options. Response transformation is enabled by default.
type SlidingWindowThrottle ¶
type SlidingWindowThrottle = client.SlidingWindowThrottle
Throttle types
func NewSlidingWindowThrottle ¶
func NewSlidingWindowThrottle(requestsPer10Seconds int) *SlidingWindowThrottle
NewSlidingWindowThrottle creates a new sliding window throttle.
type SortByUnion ¶ added in v1.3.0
type SortByUnion = generated.SortByUnion
SortByUnion is the union type for sortBy ([]SortField or false)
func SortBy ¶ added in v1.3.0
func SortBy(fields ...SortField) *SortByUnion
SortBy creates a sortBy parameter for RunQuery from SortField values. This wraps the fields in the union type required by the API.
Example:
result, _ := client.RunQuery(ctx, quickbase.RunQueryBody{
From: tableId,
Select: quickbase.Ints(3, 6, 7),
SortBy: quickbase.SortBy(quickbase.Asc(6), quickbase.Desc(7)),
})
type SortFieldOrder ¶ added in v1.4.0
type SortFieldOrder = generated.SortFieldOrder
SortFieldOrder is the sort order (ASC, DESC)
type SortSpec ¶ added in v1.4.0
SortSpec specifies a sort field and order for RunQuery.
func Asc ¶ added in v1.3.0
Asc creates a SortSpec for ascending order. Accepts field ID (int) or alias (string) when used with schema.
Example:
quickbase.Asc(6) // Sort by field 6 ascending
quickbase.Asc("name") // Sort by "name" alias ascending (with schema)
type TableInfo ¶ added in v1.4.0
TableInfo contains the result of GetTable, CreateTable, UpdateTable, GetAppTables
type TableSchema ¶ added in v1.3.0
type TableSchema = core.TableSchema
Re-export types for convenience
type TransferUserTokenBuilder ¶ added in v1.4.0
type TransferUserTokenBuilder = client.TransferUserTokenBuilder
TransferUserTokenBuilder provides a fluent API for transferring user tokens.
type UndenyUsersBuilder ¶ added in v1.4.0
type UndenyUsersBuilder = client.UndenyUsersBuilder
UndenyUsersBuilder provides a fluent API for undenying users.
type UpdateAppBody ¶ added in v1.1.0
type UpdateAppBody = generated.UpdateAppJSONRequestBody
UpdateAppBody is the request body for UpdateApp
type UpdateAppBuilder ¶ added in v1.4.0
type UpdateAppBuilder = client.UpdateAppBuilder
UpdateAppBuilder provides a fluent API for updating apps.
type UpdateFieldBody ¶ added in v1.1.0
type UpdateFieldBody = generated.UpdateFieldJSONRequestBody
UpdateFieldBody is the request body for UpdateField
type UpdateFieldBuilder ¶ added in v1.4.0
type UpdateFieldBuilder = client.UpdateFieldBuilder
UpdateFieldBuilder provides a fluent API for updating fields.
type UpdateFieldParams ¶ added in v1.1.0
type UpdateFieldParams = generated.UpdateFieldParams
UpdateFieldParams are the parameters for UpdateField
type UpdateRelationshipBody ¶ added in v1.1.0
type UpdateRelationshipBody = generated.UpdateRelationshipJSONRequestBody
UpdateRelationshipBody is the request body for UpdateRelationship
type UpdateRelationshipBuilder ¶ added in v1.4.0
type UpdateRelationshipBuilder = client.UpdateRelationshipBuilder
UpdateRelationshipBuilder provides a fluent API for updating relationships.
type UpdateSolutionBuilder ¶ added in v1.4.0
type UpdateSolutionBuilder = client.UpdateSolutionBuilder
UpdateSolutionBuilder provides a fluent API for updating solutions.
type UpdateSolutionToRecordBuilder ¶ added in v1.4.0
type UpdateSolutionToRecordBuilder = client.UpdateSolutionToRecordBuilder
UpdateSolutionToRecordBuilder provides a fluent API for updating solutions to records.
type UpdateTableBody ¶ added in v1.1.0
type UpdateTableBody = generated.UpdateTableJSONRequestBody
UpdateTableBody is the request body for UpdateTable
type UpdateTableBuilder ¶ added in v1.4.0
type UpdateTableBuilder = client.UpdateTableBuilder
UpdateTableBuilder provides a fluent API for updating tables.
type UpdateTableParams ¶ added in v1.1.0
type UpdateTableParams = generated.UpdateTableParams
UpdateTableParams are the parameters for UpdateTable
type UpsertBody ¶ added in v1.1.0
type UpsertBody = generated.UpsertJSONRequestBody
UpsertBody is the request body for Upsert (insert/update records)
type UpsertResult ¶ added in v1.1.0
type UpsertResult = client.UpsertResult
UpsertResult contains the result of an Upsert call
Directories
¶
| Path | Synopsis |
|---|---|
|
Package auth provides authentication strategies for the QuickBase API.
|
Package auth provides authentication strategies for the QuickBase API. |
|
Package client provides a QuickBase API client with retry and rate limiting.
|
Package client provides a QuickBase API client with retry and rate limiting. |
|
cmd
|
|
|
generate-builders
command
Package main generates fluent builder methods from the OpenAPI spec
|
Package main generates fluent builder methods from the OpenAPI spec |
|
generate-wrappers
command
Package main generates wrapper methods from the OpenAPI spec
|
Package main generates wrapper methods from the OpenAPI spec |
|
schema
command
CLI Schema Generator
|
CLI Schema Generator |
|
Package core provides shared types and utilities for the QuickBase SDK.
|
Package core provides shared types and utilities for the QuickBase SDK. |
|
internal
|
|
|
generated
Package generated provides primitives to interact with the openapi HTTP API.
|
Package generated provides primitives to interact with the openapi HTTP API. |
|
Package xml provides access to legacy QuickBase XML API endpoints.
|
Package xml provides access to legacy QuickBase XML API endpoints. |