Learn R Programming

qbr (version 1.3.0)

update_records: Insert/Update records

Description

Insert and/or update record(s) in a table. Update can use the key field on the table, or any other supported unique field. Refer to the Field types page for more information about how each field type should be formatted. This operation allows for incremental processing of successful records, even when some of the records fail. This endpoint supports a maximum payload size of 10MB.

Usage

update_records(
  subdomain,
  auth,
  to,
  records,
  mergeFieldId = 3,
  fieldsToReturn = list(3),
  agent = NULL
)

Value

List of JSON containing return data requested via the fieldsToReturn argument and metadata regarding created/updated records, referenced but unchanged records, and records having any errors while being processed.

Arguments

subdomain

Character vector with one element. Found at the beginning of the Quickbase URL. Realm specific.

auth

Character vector with one element. The Quickbase authentication scheme you are using to authenticate the request (e.g., user token).

to

Character vector. Identifier of the target table.

records

Tibble containing the data you want to insert/update in the target table, where column names correspond to field identifiers. Alternatively, a list containing record data as json if your data contain User or List-user data types.

mergeFieldId

Character vector. Field identifier of the key field or unique field to merge upon. Defaults to 3, representing Record ID#.

fieldsToReturn

Character vector of field identifiers. Returns data for field 3 (Record ID#) in addition to any field identifiers supplied.

agent

Optional. Character vector with one element. Describes user/agent making API call.

Examples

Run this code
if (FALSE) {
  new_data <- dplyr::tibble(`3` = c(5, 7), `6` = c("A", "B"))
  update_records(subdomain = "bhi",
                 auth = keyring::key_get("qb_example"),
                 to = "bn9d8iesz",
                 records = new_data)
}

Run the code above in your browser using DataLab