Make HTTP Request to DNAnexus API Server

Usage

dxHTTPRequest(resource, data, headers = list(), jsonifyData = TRUE, alwaysRetry = FALSE)

Arguments

resource
String URI of API method, e.g. "/file/new", or "/class-xxxx/describe", where "class-xxxx" is some entity ID on the DNAnexus platform.
data
R object to be converted into JSON, using RJSONIO::toJSON. If jsonifyData is set to FALSE, it is treated as a string value instead and passed through directly.
headers
List of HTTP headers to use, keyed by the header names.
jsonifyData
Whether to call RJSONIO::toJSON on data to create the JSON string or pass through the value of data directly. (Default is TRUE.)
alwaysRetry
Whether to always retry the API call (assuming a non-error status code was received).

Value

If the API call is successful, the parsed JSON of the API server response is returned (using RJSONIO::fromJSON).

Description

Makes a POST HTTP Request to the DNAnexus API Server using stored configuration values.

Examples

# Basic API call; use RJSONIO::namedEmptyList for an empty hash ## Not run: dxHTTPRequest("/gtable-xxxx/get", namedEmptyList) # API call with nonempty input hash ## Not run: dxHTTPRequest("/record/new", list("project"="project-xxxx"))

See also

printenv