Questions tagged [plumber]

plumber is an R package used to create HTTP APIs from R. It uses annotations above your function definitions to define the structure of your API using existing R code.

The plumber R package allows R users to create HTTP APIs from their R code.

  • Official documentation - Includes documentation about the various features and online examples.
  • CRAN - The package is available on CRAN for easier installation.
307 questions
33
votes
3 answers

Building RESTful API using R

I am thinking about building a RESTful API using the programming language R, mainly to expose my machine learning model to the user in an API format. I know there are some options like export to PMML, PFA and use other languages to take care of the…
B.Mr.W.
  • 18,910
  • 35
  • 114
  • 178
12
votes
1 answer

Oauth with Plumber API in R

I have created a sample function using plumber package. #* @get /tags printmyname <- function(x) print(x) When I run the following procedure. library(plumber) r <- plumb("plumber_Usman2.R") r$run(host="0.0.0.0",port=8000) An API is exposed on…
Rana Usman
  • 1,031
  • 7
  • 21
10
votes
1 answer

How do we return ggplot graphs through plumber web api?

I was plotting a bar plot using ggplot and I created this function as a web api using plumber package in R. library(plumber) library(ggplot2) #' @get /histogram_test #' @png histogram_test <- function(){ mtcars=mtcars …
Aradhya Kasat
  • 221
  • 1
  • 11
9
votes
2 answers

Reconnect to PostgreSQL database with R's pool package

I have an API built with R plumber that connects to a PostgreSQL database using RPostgreSQL and pool (although this would also apply if I was using a Shiny app): # create the connection pool pool <- dbPool( drv = PostgreSQL(), host =…
Devin
  • 851
  • 12
  • 32
8
votes
1 answer

Using R plumber for web API over HTTPS

I am trying to use Plumber in R to expose a model through web API. I want the API calls to be secure over https. I tried to find information on implementing secure API using plumber but unfortunately haven't found anything. Does anyone has…
Anshuman Panwar
  • 137
  • 1
  • 4
8
votes
1 answer

How to authenticate calls to a plumber API from an app hosted on shinyapps.io?

I want to build an app with the following architecture: The frontend would be deployed on shinyapps.io and would make call to an API written with plumber to interact with data. The app would be private so a user would have to authenticate with the…
vwrobel
  • 1,706
  • 15
  • 25
7
votes
1 answer

using plumber package in Rscript and running script from cmd

In my Rscript (run.R): library(plumber) r <- plumb("script.R") r$run(host="127.0.0.1",port=8000) If I run the above code using RStudio or R console it works fine and gives me access after following output: Starting server to listen on port 8000…
Yusra Shahid
  • 104
  • 9
7
votes
1 answer

How to return JSON using plumber api in R

I am new to R . I am supposed to expose rest service using R , So i found plumber to expose rest service using R , I Successfully implemented plumber in R , but in response i am receiving a json array like below…
6
votes
0 answers

Send POST request to Shiny

I've seen a number of people ask various versions of this question but I haven't found a clear answer. I would like to send a POST request to an R Shiny application so that after the request is received the Shiny app can render the data from the…
Jacqueline Nolis
  • 1,457
  • 15
  • 22
6
votes
1 answer

Basic questions about R plumber

I am newbie to R plumber which is a REST server that can expose R function as rest API. I would ask following questions: Is R plumber server strong enough to be adopted in production environment? The function,which is exposed as rest api, If the…
Tom
  • 5,848
  • 12
  • 44
  • 104
5
votes
0 answers

R/Plumber: Rerouting Swagger UI through Nginx Reverse Proxy

Background I have a remote server on which an R API service is running by the use of Plumber. It is fully operational in the sense that I can call my service externally. I am using an Ubuntu/Nginx reverse proxy setup. The Plumber service is…
JDG
  • 1,342
  • 8
  • 18
5
votes
0 answers

OAuth with a Dockerized Plumber API in Azure

I have created an API using R's plumber package and then dockerized the API (https://www.rplumber.io/docs/hosting.html#docker). I can hit the API locally. I then pushed the docker container to Azure registry and made it into a web app. I can hit…
Tyler Rinker
  • 108,132
  • 65
  • 322
  • 519
5
votes
1 answer

Plumber API works on server but not when I set up with systemd

So I have an API that works fine locally as well as on the server if I run the plumber commands manually, by which I mean ssh-ing in the server and running : r <- plumb("plumber.R") r$run(port=8000, host = "0.0.0.0") It looks like this: #*…
Chris Beeley
  • 591
  • 6
  • 22
5
votes
2 answers

R POST response using Plumber API converts 10-decimal-places double (desired precision) to 4-decimal-places double at client side

Platform: - AWS Instance with 16 cores and 128 GIG RAM. - Redhat Enterprise 7.5. - R. - RStudio Server. - Plumber API exposes R functions as Web Service endpoints. - Client side is Excel VBA. Problem: - Data table with different types of…
Tiger
  • 87
  • 7
5
votes
1 answer

Display html widget from plumber API in shiny application

I'm trying to display an interactive graph requested through a plumber API and display it in a shiny application. I can't figure out how to make it work, using for example highcharter. My example application with a base plot and highcharter graph…
Jerry424
  • 188
  • 6
1
2 3
20 21