Learn R Programming

synapseClient (version 1.14-0)

synRestGET: Synapse REST Functions

Description

Functions providing a generic interface to the Web Services

Usage

synRestGET(uri, endpoint=synapseRepoServiceEndpoint()) synRestDELETE(uri, endpoint=synapseRepoServiceEndpoint()) synRestPOST(uri, body, endpoint=synapseRepoServiceEndpoint()) synRestPUT(uri, body, endpoint=synapseRepoServiceEndpoint())

Arguments

uri
uri of the request, e.g. "/entity/syn101", "/userProfile"
body
body of a PUT or POST request. May be either an R list/vector or a recognized Synapse object type (i.e. a subtype of SimplePropertyOwner).
endpoint
endpoint for the request. Default is the Synapse Respository services. See also synapseAuthServiceEndpoint(), synapseFileServiceEndpoint().

Value

an R list generated by calling fromJSON on the server response.

Details

These functions take care of authentication, following redirects, checking if the client is black listed, checking error statuses, performing retries with exponential back off. As such the functions are not so much 'low level' as they are generic: They allow the user to access the Synapse web services using the API documents (http://rest.synapse.org) to issue requests to new services in advance of specialized convenience functions in Synapse Client.

See Also

synapseRepoServiceEndpoint synapseFileServiceEndpoint synapseAuthServiceEndpoint synapsePortalEndpoint