Skip to content

Latest commit

 

History

History
464 lines (302 loc) · 12.5 KB

RecordApi.md

File metadata and controls

464 lines (302 loc) · 12.5 KB

client\RecordApi

All URIs are relative to https://api.gridly.com

Method HTTP request Description
Create Post /v1/views/{viewId}/records create
Delete Delete /v1/views/{viewId}/records delete
Fetch Get /v1/views/{viewId}/records fetch
FetchHistories Get /v1/views/{viewId}/records/{recordId}/histories fetchHistories
Update Patch /v1/views/{viewId}/records update
UpdateRecord Patch /v1/views/{viewId}/records/{id} updateRecord

Create

[]Record Create(ctx, viewId).CreateRecords(createRecords).Execute()

create

Example

package main

import (
    "context"
    "fmt"
    "os"
    gridly "./openapi"
)

func main() {
    viewId := "viewId_example" // string | viewId
    createRecords := []gridly.SetRecord{*gridly.NewSetRecord()} // []SetRecord | createRecords

    configuration := gridly.NewConfiguration()
    apiClient := gridly.NewAPIClient(configuration)
    resp, r, err := apiClient.RecordApi.Create(context.Background(), viewId).CreateRecords(createRecords).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `RecordApi.Create``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Create`: []Record
    fmt.Fprintf(os.Stdout, "Response from `RecordApi.Create`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
viewId string viewId

Other Parameters

Other parameters are passed through a pointer to a apiCreateRequest struct via the builder pattern

Name Type Description Notes

createRecords | []SetRecord | createRecords |

Return type

[]Record

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Delete

Delete(ctx, viewId).DeleteRecord(deleteRecord).Execute()

delete

Example

package main

import (
    "context"
    "fmt"
    "os"
    gridly "./openapi"
)

func main() {
    viewId := "viewId_example" // string | viewId
    deleteRecord := *gridly.NewDeleteRecord() // DeleteRecord | 

    configuration := gridly.NewConfiguration()
    apiClient := gridly.NewAPIClient(configuration)
    resp, r, err := apiClient.RecordApi.Delete(context.Background(), viewId).DeleteRecord(deleteRecord).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `RecordApi.Delete``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
viewId string viewId

Other Parameters

Other parameters are passed through a pointer to a apiDeleteRequest struct via the builder pattern

Name Type Description Notes

deleteRecord | DeleteRecord | |

Return type

(empty response body)

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Fetch

[]Record Fetch(ctx, viewId).ColumnIds(columnIds).Page(page).Query(query).Sort(sort).FetchFileOption(fetchFileOption).AfterRecordId(afterRecordId).BeforeRecordId(beforeRecordId).Execute()

fetch

Example

package main

import (
    "context"
    "fmt"
    "os"
    gridly "./openapi"
)

func main() {
    viewId := "viewId_example" // string | viewId
    columnIds := []string{"Inner_example"} // []string | columnIds (optional) (default to [])
    page := "page_example" // string | page (optional) (default to "{}")
    query := "query_example" // string | query (optional) (default to "{}")
    sort := "sort_example" // string | sort (optional) (default to "{}")
    fetchFileOption := gridly.FetchFileOption("all") // FetchFileOption | fetchFileOption (optional) (default to "id")
    afterRecordId := "afterRecordId_example" // string | afterRecordId (optional)
    beforeRecordId := "beforeRecordId_example" // string | beforeRecordId (optional)

    configuration := gridly.NewConfiguration()
    apiClient := gridly.NewAPIClient(configuration)
    resp, r, err := apiClient.RecordApi.Fetch(context.Background(), viewId).ColumnIds(columnIds).Page(page).Query(query).Sort(sort).FetchFileOption(fetchFileOption).AfterRecordId(afterRecordId).BeforeRecordId(beforeRecordId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `RecordApi.Fetch``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Fetch`: []Record
    fmt.Fprintf(os.Stdout, "Response from `RecordApi.Fetch`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
viewId string viewId

Other Parameters

Other parameters are passed through a pointer to a apiFetchRequest struct via the builder pattern

Name Type Description Notes

columnIds | []string | columnIds | [default to []] page | string | page | [default to "{}"] query | string | query | [default to "{}"] sort | string | sort | [default to "{}"] fetchFileOption | FetchFileOption | fetchFileOption | [default to "id"] afterRecordId | string | afterRecordId | beforeRecordId | string | beforeRecordId |

Return type

[]Record

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FetchHistories

[]RecordHistory FetchHistories(ctx, viewId, recordId).FetchRequest(fetchRequest).Execute()

fetchHistories

Example

package main

import (
    "context"
    "fmt"
    "os"
    gridly "./openapi"
)

func main() {
    viewId := "viewId_example" // string | viewId
    recordId := "recordId_example" // string | recordId
    fetchRequest := map[string][]gridly.FetchRecordHistoryRequest{ ... } // FetchRecordHistoryRequest | fetchRequest

    configuration := gridly.NewConfiguration()
    apiClient := gridly.NewAPIClient(configuration)
    resp, r, err := apiClient.RecordApi.FetchHistories(context.Background(), viewId, recordId).FetchRequest(fetchRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `RecordApi.FetchHistories``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `FetchHistories`: []RecordHistory
    fmt.Fprintf(os.Stdout, "Response from `RecordApi.FetchHistories`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
viewId string viewId
recordId string recordId

Other Parameters

Other parameters are passed through a pointer to a apiFetchHistoriesRequest struct via the builder pattern

Name Type Description Notes

fetchRequest | FetchRecordHistoryRequest | fetchRequest |

Return type

[]RecordHistory

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Update

[]Record Update(ctx, viewId).SetRecord(setRecord).Execute()

update

Example

package main

import (
    "context"
    "fmt"
    "os"
    gridly "./openapi"
)

func main() {
    viewId := "viewId_example" // string | viewId
    setRecord := []gridly.SetRecord{*gridly.NewSetRecord()} // []SetRecord | 

    configuration := gridly.NewConfiguration()
    apiClient := gridly.NewAPIClient(configuration)
    resp, r, err := apiClient.RecordApi.Update(context.Background(), viewId).SetRecord(setRecord).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `RecordApi.Update``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Update`: []Record
    fmt.Fprintf(os.Stdout, "Response from `RecordApi.Update`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
viewId string viewId

Other Parameters

Other parameters are passed through a pointer to a apiUpdateRequest struct via the builder pattern

Name Type Description Notes

setRecord | []SetRecord | |

Return type

[]Record

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateRecord

Record UpdateRecord(ctx, id, viewId).SetRecord(setRecord).Path(path).Execute()

updateRecord

Example

package main

import (
    "context"
    "fmt"
    "os"
    gridly "./openapi"
)

func main() {
    id := "id_example" // string | id
    viewId := "viewId_example" // string | viewId
    setRecord := *gridly.NewSetRecord() // SetRecord | 
    path := "path_example" // string | path (optional)

    configuration := gridly.NewConfiguration()
    apiClient := gridly.NewAPIClient(configuration)
    resp, r, err := apiClient.RecordApi.UpdateRecord(context.Background(), id, viewId).SetRecord(setRecord).Path(path).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `RecordApi.UpdateRecord``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateRecord`: Record
    fmt.Fprintf(os.Stdout, "Response from `RecordApi.UpdateRecord`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string id
viewId string viewId

Other Parameters

Other parameters are passed through a pointer to a apiUpdateRecordRequest struct via the builder pattern

Name Type Description Notes

setRecord | SetRecord | | path | string | path |

Return type

Record

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]