Skip to main content
StickyF.A.Q.

API Reference > Database

  • November 24, 2023
  • 4 replies
  • 422 views
API Reference > Database
Lais Laudari

Do you need help with your API queries and/or mutation?

Here are a few that might help you!😉

 

🔎Queries

📍 GET TABLE RECORDS WITH PAGINATION - TABLE ID

{
  table_records(first: 10, table_id: "XXXXXXX") {
    edges {
      cursor
      node {
        id
        title
        url
      }
    }
    pageInfo {
      endCursor
      hasNextPage
      hasPreviousPage
      startCursor
    }
  }
}

📍 GET TABLE RECORDS  -  TABLE RECORD ID
{
  table_record(id: XXX) {
    assignees {
      id
      name
    }
    created_at
    created_by {
      id
      name
    }
    due_date
    finished_at
    id
    labels {
      id
      name
    }
    parent_relations {
      name
      source_type
    }
    record_fields {
      array_value
      date_value
      datetime_value
      filled_at
      float_value
      name
      required
      updated_at
      value
    }
    summary {
      title
      value
    }
    table {
      id
    }
    title
    updated_at
    url
  }
}

📍 FIND TABLE RECORDS  -  FIELD ID | FIELD VALUE
{
  findRecords(tableId:"xxxx", first: 50, search:{fieldId:"xxx", fieldValue:"xxxx"}){
    edges{
      node{
        title
        id
      }
    }
  }
}
 

🛠Mutations

📍CREATE TABLE RECORD

mutation {
  createTableRecord(
    input: {
      table_id: "xxxxx"
      title: "my record"
      due_date: "2017-12-31T00:00-03:00"
      fields_attributes: [
        { field_id: "first_name", field_value: "Tom" },
        { field_id: "last_name", field_value: "Trindade" },
        { field_id: "email", field_value: "tom@trindade.com" }
      ]
    }
  ) {
    table_record {
      id
      title
      due_date
      record_fields {
        name
        value
      }
    }
  }
}


📍CREATE TABLE FIELD

 {
  createTableField(
    input: {
      table_id: "xxx"
      type: "radio_vertical"
      label: "Gender"
      options: ["Female", "Male"]
      description: "Select your gender"
      help: ""
      required: true
      minimal_view: false
      custom_validation: ""
    }
  ) {
    table_field {
      id
      label
      type
      options
      description
      help
      required
      minimal_view
      custom_validation
    }
  }
}
 

📍UPDATE TABLE RECORD
mutation {
  updateTableRecord(
    input: {
      id: "xxxx"
      title: "My custom title"
      due_date: "2017-07-31T00:00-05:00"
    }
  ) {
    table_record {
      id
      title
      due_date
      record_fields {
        name
        value
      }
    }
  }
}

📍SET TABLE RECORD FIELD VALUE

mutation {
  setTableRecordFieldValue(
    input: {
      table_record_id: "xxx"
      field_id: "first_name"
      value: "Theo"
    }
  ) {
    table_record {
      id
      title
    }
    table_record_field {
      value
    }
  }
}

📍DELETE TABLE RECORD

mutation {
  deleteTableRecord(input: {id: "xxxx"}) {
    success
  }
}

📍MUTIPLES CREATE TABLE RECORD

mutation {
  record1: createTableRecord(input: {
    table_id: "xxxx",
    fields_attributes: [
      {field_id: "xxxx", field_value: "xxxx"}
    ]}) {
    table_record {
      id
    }
  }
  n2: createTableRecord(input: {
    table_id: "xxxx",
    fields_attributes: [
      {field_id: "xxxx", field_value: "xxxx"}
    ]}) {
    table_record {
      id
    }
  }
}
 

📍UPDATE STATUS FIELD

First you need to know the status ID
{
  table(id:"xxxx"){
    statuses{
      name
      id
    }
  }
}


After that you can do the action
mutation {
  updateTableRecord(input: {statusId: xxx, id: xxx}) {
    table_record {
      title
      status {
        name
      }
    }
  }
}


 

Did this topic help you find an answer to your question?

4 replies

marcosmelo
Forum|alt.badge.img+18
  • Legend
  • 1466 replies
  • November 24, 2023

Very good!


Ezequiel Souza
Forum|alt.badge.img+14

Great! Thanks for sharing


rvitoriano
  • Inspiring
  • 23 replies
  • June 17, 2025

Bom dia,

Muito obrigado, lembrando que isso serve para o graphql, mas, para requisição HTTP dentro do Pipefy, a sintaxe muda.

Além disso, seria legal deixar sintaxes para múltiplos campos, tambem, afinal, muitos “não-programadores” como eu usam o Pipefy.


Bits Bárbara Terra
Community Manager

Olá ​@rvitoriano  ! Tudo certo por aí? 😊

Obrigada por registrar a sua necessidade aqui na comunidade! Já compartilhei internamente com os times de produto para análise e estudo de implantação.

Abraços!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings