All URIs are relative to https://api.gridly.com
Method | HTTP request | Description |
---|---|---|
Create | Post /v1/databases | create |
Delete | Delete /v1/databases/{dbId} | delete |
Duplicate | Post /v1/databases/{dbId}/duplicate | duplicate |
Get | Get /v1/databases/{dbId} | get |
List | Get /v1/databases | list |
Update | Put /v1/databases/{dbId} | update |
Database Create(ctx).ProjectId(projectId).Body(body).Execute()
create
package main
import (
"context"
"fmt"
"os"
gridly "./openapi"
)
func main() {
projectId := int64(789) // int64 | projectId
body := *gridly.NewCreateDatabase("Name_example") // CreateDatabase | body
configuration := gridly.NewConfiguration()
apiClient := gridly.NewAPIClient(configuration)
resp, r, err := apiClient.DatabaseApi.Create(context.Background()).ProjectId(projectId).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DatabaseApi.Create``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Create`: Database
fmt.Fprintf(os.Stdout, "Response from `DatabaseApi.Create`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
projectId | int64 | projectId | |
body | CreateDatabase | body |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Delete(ctx, dbId).Execute()
delete
package main
import (
"context"
"fmt"
"os"
gridly "./openapi"
)
func main() {
dbId := "dbId_example" // string | dbId
configuration := gridly.NewConfiguration()
apiClient := gridly.NewAPIClient(configuration)
resp, r, err := apiClient.DatabaseApi.Delete(context.Background(), dbId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DatabaseApi.Delete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
dbId | string | dbId |
Other parameters are passed through a pointer to a apiDeleteRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Database Duplicate(ctx, dbId).ProjectId(projectId).Body(body).Execute()
duplicate
package main
import (
"context"
"fmt"
"os"
gridly "./openapi"
)
func main() {
dbId := "dbId_example" // string | dbId
projectId := int64(789) // int64 | projectId
body := *gridly.NewCreateDatabase("Name_example") // CreateDatabase | body
configuration := gridly.NewConfiguration()
apiClient := gridly.NewAPIClient(configuration)
resp, r, err := apiClient.DatabaseApi.Duplicate(context.Background(), dbId).ProjectId(projectId).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DatabaseApi.Duplicate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Duplicate`: Database
fmt.Fprintf(os.Stdout, "Response from `DatabaseApi.Duplicate`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
dbId | string | dbId |
Other parameters are passed through a pointer to a apiDuplicateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
projectId | int64 | projectId | body | CreateDatabase | body |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Database Get(ctx, dbId).Execute()
get
package main
import (
"context"
"fmt"
"os"
gridly "./openapi"
)
func main() {
dbId := "dbId_example" // string | dbId
configuration := gridly.NewConfiguration()
apiClient := gridly.NewAPIClient(configuration)
resp, r, err := apiClient.DatabaseApi.Get(context.Background(), dbId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DatabaseApi.Get``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Get`: Database
fmt.Fprintf(os.Stdout, "Response from `DatabaseApi.Get`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
dbId | string | dbId |
Other parameters are passed through a pointer to a apiGetRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Database List(ctx).Expand(expand).Page(page).ProjectId(projectId).Search(search).Sort(sort).Execute()
list
package main
import (
"context"
"fmt"
"os"
gridly "./openapi"
)
func main() {
expand := []string{"Expand_example"} // []string | expand (optional)
page := "page_example" // string | page (optional) (default to "")
projectId := int64(789) // int64 | projectId (optional)
search := "search_example" // string | search (optional)
sort := "sort_example" // string | sort (optional) (default to "")
configuration := gridly.NewConfiguration()
apiClient := gridly.NewAPIClient(configuration)
resp, r, err := apiClient.DatabaseApi.List(context.Background()).Expand(expand).Page(page).ProjectId(projectId).Search(search).Sort(sort).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DatabaseApi.List``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `List`: []Database
fmt.Fprintf(os.Stdout, "Response from `DatabaseApi.List`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
expand | []string | expand | |
page | string | page | [default to ""] |
projectId | int64 | projectId | |
search | string | search | |
sort | string | sort | [default to ""] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Database Update(ctx, dbId).Body(body).Execute()
update
package main
import (
"context"
"fmt"
"os"
gridly "./openapi"
)
func main() {
dbId := "dbId_example" // string | dbId
body := *gridly.NewUpdateDatabase("Name_example") // UpdateDatabase | body
configuration := gridly.NewConfiguration()
apiClient := gridly.NewAPIClient(configuration)
resp, r, err := apiClient.DatabaseApi.Update(context.Background(), dbId).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DatabaseApi.Update``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Update`: Database
fmt.Fprintf(os.Stdout, "Response from `DatabaseApi.Update`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
dbId | string | dbId |
Other parameters are passed through a pointer to a apiUpdateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
body | UpdateDatabase | body |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]