Set Up the API KeySource:
Instructions for the first-time use of the STATcube REST API. See also the wingarc docs for the vendor documentation on API keys.
In order to use the REST API of STATcube it is necessary to provide an API key. This means that you will need a subscription for STATcube. Subscribed users will automatically get access to the STATcube API. The API key can be displayed under the account preferences 1 of STATcube.
#> ℹ The provided key will be available for this R session #> ℹ Add `STATCUBE_KEY_EXT = XXXX` to "~/.Renviron" to set the key #> persistently. Replace `XXXX` with your key
As suggested by the code output, the key will be used for any API
requests that happen in the same R session. You can set the key
persistently by modifying
.Renviron. This can be done
sc_key_set() will perform a test request to
verify that the key is valid and throw an error if the test request is
sc_key_set('wrong key') #> Error in sc_key_set("wrong key") : The key could not be verified #> Run sc_last_error() or read the online documentation for more details
See the JSON requests article to see how tables can be defined in the STATcube GUI and imported into R. Alternatively, import a saved table by following the saved tables article. For more advanced usage of STATcubeR, see the schema article and custom tables article
Employees should use one of our internal STATcube servers for API requests. Please refer to the following internal confluence documentation for more information on how to get started: