Skip to main content
F.A.Q.

How do I update the record status field via API?

How do I update the record status field via API?
Lais Laudari

To update the status of a record via API, just follow the steps below.

👉🏼First you need to know the Status ID. The following query will give you this information:

{
  table(id: "XXXXXXXXXX") {
    statuses {
      name
      id
    }
  }
}
 

👉🏼Next, you will use the Status ID obtained to update the field of a record by executing the following mutation:

mutation {
  updateTableRecord(input: {statusId: XXXXX, id: XXXXXXXX}) {
    table_record {
      title
      status {
        name
      }
    }
  }
}

⚠To find out the record's ID, simply access the database and when you open the record identify the final number that appears in the browser's address bar.
 

Or via API by running the query below:

{
  table_records(table_id: "XXXXXXXXX") {
    edges {
      cursor
      node {
        id
        title   
      }
    }
    pageInfo {
      endCursor
      hasNextPage
      hasPreviousPage
      startCursor
    }
  }
}

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

0 replies

Be the first to 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