Skip to content
Go to Micro

Bulk reorder pinned records

client.Views.Records.Reorder(ctx, objectType, viewID, params) error
PATCH/v2/prism/{teamId}/{objectType}/views/{viewId}/records

Bulk reorder pinned records

ParametersExpand Collapse
One of the following:
const ViewRecordReorderParamsObjectTypeComment ViewRecordReorderParamsObjectType = "comment"
const ViewRecordReorderParamsObjectTypeAction ViewRecordReorderParamsObjectType = "action"
const ViewRecordReorderParamsObjectTypeDeal ViewRecordReorderParamsObjectType = "deal"
const ViewRecordReorderParamsObjectTypeEngagement ViewRecordReorderParamsObjectType = "engagement"
const ViewRecordReorderParamsObjectTypeDocument ViewRecordReorderParamsObjectType = "document"
const ViewRecordReorderParamsObjectTypeEvent ViewRecordReorderParamsObjectType = "event"
const ViewRecordReorderParamsObjectTypeIdentity ViewRecordReorderParamsObjectType = "identity"
const ViewRecordReorderParamsObjectTypeOrganization ViewRecordReorderParamsObjectType = "organization"
viewID string
formatuuid
params ViewRecordReorderParams
TeamID param.Field[string]Optional

Path param

formatuuid
ObjectIDs param.Field[[]string]

Body param

IdempotencyKey param.Field[string]Optional

Header param: A unique key (UUID or any opaque string up to 255 chars) for an authenticated POST, PUT, or PATCH request. The server retains the initial claim for 24 hours and replays a completed non-5xx response only when the method, path, and request body all match. Reusing a non-expired key with a different method, path, or body returns 409 idempotency_key_mismatch; reusing it after expiry returns 409 idempotency_key_stale, so use a new key. Replays include the idempotent-replay: true response header.

minLength1
maxLength255

Bulk reorder pinned records

package main

import (
  "context"

  "github.com/micro-so/micro-sdk-go"
  "github.com/micro-so/micro-sdk-go/option"
)

func main() {
  client := micro.NewClient(
    option.WithAPIKey("My API Key"),
    option.WithTeamID("My Team ID"),
  )
  err := client.Views.Records.Reorder(
    context.TODO(),
    micro.ViewRecordReorderParamsObjectTypeComment,
    "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    micro.ViewRecordReorderParams{
      ObjectIDs: micro.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
    },
  )
  if err != nil {
    panic(err.Error())
  }
}
Returns Examples