Skip to content
Go to Micro

Pin a record to the view (append to record_order)

client.Views.Records.Pin(ctx, objectType, viewID, objectID, params) error
POST/v2/prism/{teamId}/{objectType}/views/{viewId}/records/{objectId}

Pin a record to the view (append to record_order)

ParametersExpand Collapse
One of the following:
const ViewRecordPinParamsObjectTypeComment ViewRecordPinParamsObjectType = "comment"
const ViewRecordPinParamsObjectTypeAction ViewRecordPinParamsObjectType = "action"
const ViewRecordPinParamsObjectTypeDeal ViewRecordPinParamsObjectType = "deal"
const ViewRecordPinParamsObjectTypeEngagement ViewRecordPinParamsObjectType = "engagement"
const ViewRecordPinParamsObjectTypeDocument ViewRecordPinParamsObjectType = "document"
const ViewRecordPinParamsObjectTypeEvent ViewRecordPinParamsObjectType = "event"
const ViewRecordPinParamsObjectTypeIdentity ViewRecordPinParamsObjectType = "identity"
const ViewRecordPinParamsObjectTypeOrganization ViewRecordPinParamsObjectType = "organization"
viewID string
formatuuid
objectID string
formatuuid
params ViewRecordPinParams
TeamID param.Field[string]Optional

Path param

formatuuid
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

Pin a record to the view (append to record_order)

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.Pin(
    context.TODO(),
    micro.ViewRecordPinParamsObjectTypeComment,
    "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    micro.ViewRecordPinParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
}
Returns Examples