Skip to content

Metadata API: Access the sheet to which a field/column is linked #24

@mlrawlings

Description

@mlrawlings

I would expect a field object to also contain a linkedSheet property (or something similar) which is the id of sheet this field is linked to, if fieldType=link.

I've updated the docs to illustrate what I want:

Getting field info

GET https://api.fieldbook.com/v1/sheets/:sheet_id/fields

Lists fields in a sheet. The response is an array of objects, each with:

  • key: permanent field id, unique only within a sheet
  • name: display name for the field
  • slug: field slug used in reading/writing records via the main API
  • fieldType: data, link or formula
  • inputType: data input type, if fieldType=data
  • linkedSheet: id of the sheet this field is linked to, if fieldType=link
  • required: boolean, may be omitted if false
  • enum: for pick list fields, this is the choice list in order

...

Example:

$ curl -u $KEY:$SECRET https://api.fieldbook.com/v1/sheets/58e1a67f5662a603001916ed/fields

Response (HTTP 200 OK):

[
  {
    "key": "f0",
    "name": "Name",
    "required": true,
    "slug": "name",
    "fieldType": "data",
    "inputType": "generic"
  },
  {
    "key": "f1",
    "name": "Description",
    "slug": "description",
    "fieldType": "data",
    "inputType": "text"
  },
  {
    "key": "f2",
    "name": "Price",
    "slug": "price",
    "fieldType": "data",
    "inputType": "currency"
  },
  {
    "key": "f3",
    "name": "Status",
    "slug": "status",
    "fieldType": "data",
    "inputType": "picklist",
    "enum": [
      "Available",
      "Out of stock",
      "Discontinued"
    ]
  },
  {
    "key": "f4",
    "name": "Line items",
    "slug": "line_items",
    "fieldType": "link",
    "linkedSheet":"58e1ac185662a6030019170e"
  }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions