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
2
votes
1 answer

How to create a secure API using R?

I am trying to create an interactive app in Slack (something like this), which requires an interactive-endpoint to be created from my end. The documentation provided by plumber is here. They say "Unfortunately, Plumber does not implement HTTPS…
Tejas Bawaskar
  • 306
  • 2
  • 11
2
votes
0 answers

can i do encryption and make API secure in R

as I make a server with Plumber in R it working properly but now i want to do Three thing using it ! 1> Encryption 2> Secure(https) 3> Compression can i do this with plumber ? If yes then please give me reference Thanks
jony
  • 924
  • 10
  • 25
2
votes
1 answer

Make plumber.R return strings directly in json, not inside a list with one single element

When having strings as part of my plumber.R responses, they are always encapsulated in lists, even and especially when it's only a single string and not multiple strings in a list. I'm aware this this is how R generally seems to handle strings, as…
quassy
  • 174
  • 8
2
votes
1 answer

Docker File does not exist:.. ,on Ubuntu

I have an R plumber server, that i want to run using a docker container, and i have this configuration so far in my dockerfile FROM rocker/r-ver:3.5.0 #update OS and install linux libraries needed to run plumber RUN apt-get update -qq && apt-get…
Kristoffer Tølbøll
  • 3,157
  • 5
  • 34
  • 69
2
votes
1 answer

Read local csv in plumber API

I want to read and process a csv file by R using plumber. So far I found an ongoing discussion regarding file uploads in plumber on GitHub (though regarding binary files) and this SO answer (transforming JSON file), both supposing the use of…
Thomas
  • 1,252
  • 6
  • 24
2
votes
0 answers

How to visualize Normal Distribution Plot using Plotly?

Plot- Normal Distribution chart (Six Sigma) Package- Plotly I have tried something like this but it is not working library(plotly) y <- rgamma(1000, shape = 0.25, rate = 0.0054) dens <- data.frame(x = density(y)$x, y = density(y)$y) miny <- 0 maxy…
2
votes
1 answer

Is there a way to save data as a csv file within plumber codes?

I am new to using the plumber package and RESTful API. When I am working on the local machine, it is possible to add a line within the @get function to write to data files within the folder. I can't seem to get the same thing to work when I host it…
kf007
  • 117
  • 1
  • 9
2
votes
1 answer

How can I pass optional arguments to a plumber function without overriding the defaults specified by another function?

I'm new to the plumber package, and I'm trying to figure out how to make a function available, fun_2, through an api that can take optional arguments. The optional arguments have their default values specified in a function, fun_1, from an R…
Adam Cagle
  • 21
  • 3
2
votes
0 answers

Receive csv using plumber through a POST request

I am looking to send a csv file to a database as someone posts the file using their VBA code (VBA has a 80 character limit for their api calls, so they need to upload a csv to the server for me to parse and check) To do this, I aim to use plumber…
Hanjo Odendaal
  • 1,395
  • 2
  • 13
  • 32
2
votes
2 answers

Making plumber API available over internet

I am fairly new to the plumber package in R. I got a working API to run locally on my machine and I can access it from a live JS application on the web with the code: r <- plumb("my_api_code.r") r$run(host = "0.0.0.0", port = 8000) I have read that…
Mxblsdl
  • 484
  • 6
  • 16
2
votes
1 answer

ellipsis usage with plumber

I am trying to use ellipsis with plumber as input json may vary #' @post /predict calculate_prediction <- function(...){ arguments =list(...) print(arguments) return(arguments) This throws me error below :
2
votes
1 answer

Variable Name limits (10000 bytes) while using plumber and R to send JSON files

I'm writing production level code using R, plumber and Docker to create an API. The input to my API is a JSON file and the output is also in JSON format. I run into issues when my input file exceeds a certain space/memory limit. How do I handle such…
Tejas Bawaskar
  • 306
  • 2
  • 11
2
votes
1 answer

How to pass a lot of data to Plumber in R

I would like to play with the plumber library by making an app that takes 14 days of historical data and returns an exponential smoothing forecast. The problem is I am somewhat unfamiliar with passing a lot of data (a parameter with multiple…
Alex
  • 2,603
  • 4
  • 40
  • 73
2
votes
1 answer

R Plumber posting a PDF

I am trying to access a PDF through an HTTP post request with R Plumber, read it with the tabulizer package, and respond with the PDF in JSON format. I am posting a 53kb PDF through Postman to my route and receiving the error: Error in…
2
votes
1 answer

How to let function defined in global environment access variables defined in its calling function's environment?

connect_dw <- function() { DBI::dbConnect(RSQLite::SQLite(), ":memory:") } fetch_sql_res <- function(key, ...) { query_list <- list(...) query_sql_res <- function(.query_list = query_list, .db_connect_f = connect_dw) { con <-…
H. Yong
  • 151
  • 11