Learn R Programming

AzureML (version 0.1.1)

consumeLists: Use a web service to score data in list format

Description

Score data represented as lists, where each list represents one parameter of the web service

Usage

consumeLists(apiKey, requestUrl, ..., globalParam = setNames(list(),
  character(0)), retryDelay = 0.3)

Arguments

apiKey
primary access key as a string
requestUrl
API URL
...
variable number of requests entered as lists in key-value format
globalParam
global parameters entered as a list, default value is an empty list
retryDelay
the time in seconds to delay before retrying in case of a server error, default value is 0.3 seconds

Value

  • returnDataFrame data frame containing results returned from web service call

See Also

discoverSchema publishWebService Other consumption functions: consumeDataframe; consumeFile

Examples

Run this code
add <- function(x,y) { return(x+y) }
newService <- publishWebService("add", "add",
 list("x"="int","y"="int"), list("z"="int"), wsID, authToken)
webserviceDetails <- newService[[1]]
endpoints <- newService[[2]]

response <- consumeLists(endpoints[[1]]$PrimaryKey, endpoints[[1]]$ApiLocation,
 list("x"=1, "y"=2), list("x"=3, "y"=4))

Run the code above in your browser using DataLab