| kntn_record {kntnr} | R Documentation |
'kintone' Record API
Description
kntn_record() gets a single record from the specified kintone application.
kntn_records() retrieves multiple records at once. If the number of records is more than
records_per_request (the default is 100), kntn_records() automatically splits the
request into smaller subrequests.
Usage
kntn_record(app, id, as = c("data.frame", "list", "text"), verbose = FALSE)
kntn_records(
app,
fields = NULL,
query = "",
max_records = 1000L,
offset = 0L,
records_per_request = 100L,
as = c("data.frame", "list", "text"),
verbose = FALSE
)
Arguments
app |
App ID. |
id |
Record ID. |
as |
Desired type of output: |
verbose |
If |
fields |
Names of fields. |
query |
Query (e.g. |
max_records |
Max number of records to get. |
offset |
Offset of records. |
records_per_request |
Number of records per request (max: 100). |
Details
A field will be converted to the correspondent object by the type:
RECORD_NUMBER:
character__ID__:
integer__REVISION__:
integerCREATOR:
character(code)CREATED_TIME:
POSIXctMODIFIER:
character(code)UPDATED_TIME:
POSIXctSINGLE_LINE_TEXT:
characterNUMBER:
numericCALC:
characterMULTI_LINE_TEXT:
characterRICH_TEXT:
characterCHECK_BOX: nested
characterRADIO_BUTTON:
characterDROP_DOWN:
characterMULTI_SELECT: nested
characterFILE: nested
tbl_dfLINK:
characterDATE:
DateTIME:
character(R has no correspondent class for this)DATETIME:
POSIXctUSER_SELECT: nested
character(code)ORGANIZATION_SELECT: nested
character(code)GROUP_SELECT: nested
character(code)CATEGORY: nested
characterSTATUS:
characterSTATUS_ASSIGNEE:
characterSUBTABLE: nested
tbl
Some types will be converted to nested objects. You can unnest these fields by kntn_unnest.
See Also
https://developer.kintone.io/hc/en-us/articles/213149287/
Examples
## Not run:
kntn_set_auth()
app <- 10
# get a single record
d <- kntn_record(app, id = 1)
# get records up to 1000 (default)
d <- kntn_records(app)
# get records up to 5000 records at the latency of 500 records/request.
d <- kntn_records(app, max_records = 5000, records_per_request = 500L)
# get records as list
d <- kntn_records(app, as = "list")
# get records matched with the specified query and fields.
# See https://developer.kintone.io/hc/en-us/articles/213149287/ for the query syntax
d <- kntn_records(app, fields = c("timestamp", "value"),
query = "updated_time > \"2016-10-03T09:00:00+0900\"")
# Some types like SUBTABLE are converted as nested data.frame.
# You can unnest them by using kntn_unnest.
kntn_unnest(d)
## End(Not run)