Where are the API's documentation?

Where are complete ray api’s documentation?

I’am building a prototype that manage ray jobs using go, since it is what our micro services structure uses. But I am facing some challenges.

The Jobs Rest API doesn’t seem complete enough.
I was checking this link of the OpenAPI specs: Ray Jobs API

But I am facing two main issues so far:
First: Deleting an existing job for some reason is returning “405 Not allowed” when using the delete endpoint in the above link

Secondly, on the submit job part it doesn’t explain how to upload files nor how to properly set the runtime_env. The python examples only use working_dir: ./ which we can’t do since I guess it would require to PUT files somewhere before.

I’ve dug a little bit the source code and seems that there is an /api/packages/{protocol}/{package_name} endpoint somewhere that is how the files are upload but doesn’t explain how URI are obtained nor how to use that in the Submit request.

Is there any thorough documentation/tutorial somewhere?

Fixed the 405, it was skill issue. Missed the endpoint on my functions.

Still trying to figure out how to upload files and properly assign the working_dir

Hello ehellas! I’ve checked the docs team and we are no longer maintaining the link that you linked with the OpenAPI specs. For the most up to date documentation, please visit docs.ray.io.

I’ve looked through the docs and maybe these can help:

So, Ray runtime environments allow you to specify URIs in the working_dir parameter. This URI can point to a few different things, such as:

  • A public HTTP/HTTPS file. (https://example.com/my_file.zip)
  • A file in cloud storage (e.g., GCS gs://my-bucket/my-file.zip)
  • An internal storage URI. (file:///path/to/my_file.zip)

Where is the file you’re trying to upload located? Is it local in your machine or in a cloud storage?

Hey @christina, In summary, I am trying to port the Python’s SDK to other language.
Following your doc page I am using exactly what is there under the following path, which I assume it is supported since I can reach it from the base link you’ve shared:

Ray Clusters > Applications Guide > Ray Jobs Overview > Ray Jobs Rest API

In my case, I want to create Go Library that does the same thing. Instead of doing ray.submit_job() from a python script or using the CLI, I want do that from a compiled Go code.

The problem I was facing is that If I use the rest endpoint and only add a "working_dir = ‘./’ " to the endpoint it will not know what I mean.

So, I was able to figure out that the Python’s sdk actually does some magic to upload the correct files to the endpoint. So, at the end of the day the request is "Rayenv: {working_dir : “gcs://rayserver.com/myZippedFiles”} " instead of "Rayenv: {working_dir : “./”}. But then, It doesn’t mention how do we actually upload files. The OpenAPI that I shared is straight linked in that page has some hints, but lacks the upload/PUT endpoint.

Last evening I was able to do part of what I wanted reading straight the SDK codes. Some things are still a little nebulous about how the “/api/packages” endpoint works but I am getting there.

So, pretty much I have to make a PUT to “…/api/packages/gcs/myZuppedFiles”, and reference that place in the runtime. I made this work with .Zip, but I know in theory it should handle .whl and I should be able to point to Github using /api/packages/https/{something} or to S3 using /api/packages/s3/{something} but the hard part is that it is not properly documented how to handle that stuff (or any of the protocols that the API returns it supports: [‘GCS’, ‘CONDA’, ‘PIP’, ‘HTTPS’, ‘S3’, ‘GS’, ‘FILE’] ).

It would really be helpful that have that. And I actually would like to know how is the support in that area. Maybe even if I could be a little helpful with that?