I cannot deploy my API using plumberDeploy::do_deploy_api()

I tried to deploy an api via:
plumberDeploy::do_deploy_api(id, "loadData", "./", 8082, docs = TRUE) but its returning this error.plumberDeploy error|690x73.

I am guessing I have an issue with the 'path' parameter. Please I need someone to help me expantiate on the matter and provide a solution. Thank you!

Upload your API to the droplet

How do I do that please?

use getwd() instead of "./" for the time being.

Fixed in latest github version

okay i will do that.

I re-installed like you said but its still bringing up errors.


Its saying the loadData is not in the directory. What could be the problem please?

This is my plumber file with the loadData API in it:

Is your directory called Creating the regression model API using plumber seems like the mv command does not like the space in the directory

Plus you should let plumber parse your multipart post request with included parser.
Plumber Parsers — parser_form • plumber (rplumber.io)

Edit : I added a couple checks and modified the mv command to accept spaces in source path

Alright. Anyway I have renamed the files already. I think now its seeing the API but some newer errors are popping up. This is what I am getting now:

Seems pretty straighforward.

Rook package is not installed in your VM.

You can install them using

analogsea::install_r_package(droplet, "Rook")

Since I have deployed the API, how do I access the contents of the API. Am I going to use the ipv4 address, the ipv6 address or the private IP address. Because I tried the ipv4 adress/my api and it didn't connect.

droplet ip [IPADDRESS], then your api path. http protocol.


Make sure your API was deployed or check the logs.

So I want to clarify. From your documentation, does this: [[IPADDRESS]]/date/docs/ return the date directly or takes you to the swagger file first. And if so why, because I tried the same thing with the docs at true and false. For false, I expected it to return the date directly. I just want you to explain on this. THANK YOU!!

When you deploy an api, its root will be at the path you used as a parameter for do_deploy_api, if you use docs = TRUE, doc endpoint is going to be your api root + /__docs__/. All other plumber endpoints will be server relative to api root. In the example the root is date and the router endpoint is "/".

Alright thanks. Please how do I reconnect an 'ssh session' without having to provision a new droplet because it always says 'ssh session has been disconnected' after sometime.

See ?analogsea::droplets()

droplet <- analogsea::droplets()[[1]]

Or read analogsea package documentation.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.