accessValues | R Documentation |
Find value by id.
accessValues( api.key, vs.collection, id, sub = NA_character_, output.mode = "content", page.index = 1, page.size = 50 )
api.key |
character. An API Key is required to access any API call. It is used within cedarr as a header for http requests. An API key is linked to a CEDAR account (https://cedar.metadatacenter.org/profile) |
vs.collection |
character. A VS collection id. |
id |
character. A value ID in a value sets from the VS collection. |
sub |
character. A sub-item to fetch from the value. Not
evaluated if |
output.mode |
character. "full" will return the whole response object (from httr) or "content" will fetch the interest values from the response object. Getting the whole object might be interesting to have a look at system metadata, or in case of error to debug the connection. (defaults to "content") |
page.index |
integer. Index of the page to be returned (defaults to 1st page). |
page.size |
integer. Number of results per page, capped at 50. (defaults to 50). |
This function matches the following queries from the Swagger UI (https://terminology.metadatacenter.org/api/#/):
/vs-collections/{vs_collection}/values/{id}
/vs-collections/{vs_collection}/values/{id}/tree
/vs-collections/{vs_collection}/values/{id}/all-values
/vs-collections/{vs_collection}/values/{id}/value-set
These differents requests are differenciated by the id
and sub
arguments.
If a single value ID is provided: an entry for the corresponding value.
If a value ID is provided and sub
= "tree": get value tree (only for
regular values).
If a value ID is provided and sub
= "all-values": find all values
in the value set that the given value belongs to.
If a value ID is provided and sub
= "value-set": an entry for the
value set the target values belong to.
If output.mode = "full"
, the whole http response object (see httr::response).
It is structured as a list with response metadata wrapping the content
item
which contains the wanted result.
If output.mode = "content"
, the content
item is directly returned, containing
database metadata and the interesting information in the collection
subitem.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.