Get field value history for a custom object record
client.Object.FieldHistory(ctx, fieldKey, params) (*ObjectFieldHistoryResponse, error)
GET/v1/objects/{entitySlug}/values/{id}/fields/{fieldKey}/history
Returns the value-change history for a single field on a record, newest first. Consecutive identical values are collapsed. History is cursor-paginated: pass nextCursor from the previous response as after to page through older values. Only attribute-backed fields (custom attributes and attribute-backed system fields) have history — column-backed system fields return an error.
Required scope: custom_objects:read
Rate limit category: Read
Get field value history for a custom object record
package main
import (
"context"
"fmt"
"github.com/Lightfld/lightfield-go"
"github.com/Lightfld/lightfield-go/option"
)
func main() {
client := githubcomlightfldlightfieldgo.NewClient(
option.WithAPIKey("My API Key"),
)
objectFieldHistoryResponse, err := client.Object.FieldHistory(
context.TODO(),
"fieldKey",
githubcomlightfldlightfieldgo.ObjectFieldHistoryParams{
EntitySlug: "entitySlug",
ID: "id",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", objectFieldHistoryResponse.Data)
}
{
"data": [
{
"displayValue": "displayValue",
"isCreate": true,
"recordedAt": "recordedAt",
"value": "string",
"valueType": "ADDRESS"
}
],
"hasMore": true,
"nextCursor": "nextCursor"
}Returns Examples
{
"data": [
{
"displayValue": "displayValue",
"isCreate": true,
"recordedAt": "recordedAt",
"value": "string",
"valueType": "ADDRESS"
}
],
"hasMore": true,
"nextCursor": "nextCursor"
}