Skip to contents

Update record

Usage

ph_update_record(app, api, collection, id, body, token = NULL, ...)

Arguments

app

the app name

api

the api

collection

the collection name or id

id

the record id

body

the body

token

the authentication token, depending on collection's updateRule

...

the query params as supported by PocketBase View API

Value

a response

Examples

if (FALSE) {
adm <- ph_authenticate_admin_username_password(
  "eurocontrol-data-test",
  "/api/admins/auth-with-password",
  username,
  password)
  bd <- list(
    DAY_TFC= 121,
    FLIGHT_DATE= "2024-05-01 00:00:00.000Z"
    )
 id <- "lufkj3346ygx9a2"
 ph_update_record(
  app = "eurocontrol-data-test",
  api = "/api/collections",
  collection = "nw_traffic",
  token = adm$token,
  body = bd)
}