code-interpreter icon indicating copy to clipboard operation
code-interpreter copied to clipboard

Java SDK

Open 404notfoundyc-L opened this issue 1 year ago • 2 comments

Is there any plan to support the SDK for Java? Can I call the relevant interface through Java now?

404notfoundyc-L avatar Jun 20 '24 02:06 404notfoundyc-L

Hey @404notfoundyc-L it's not possible now but we'll soon be releasing new SDK where you'll be able to use OpenAPI spec for our API

mlejva avatar Jun 20 '24 14:06 mlejva

Hey @404notfoundyc-L, the communication between our SDK and API+sandboxes is documented in our infra repo:

  • API for creating sandbox, etc. (OpenAPI) — https://github.com/e2b-dev/infra/blob/main/spec/openapi.yml
  • Sandbox communication (OpenAPI, Protobuffers) — https://github.com/e2b-dev/infra/tree/main/packages/envd/spec You can check the reference implementation in TS — https://github.com/e2b-dev/E2B/tree/beta/packages/js-sdk. The protocol we use (https://connectrpc.com/) is a very thin wrapper around HTTP/1.1+protobuffers. It also has a Kotlin SDK (https://github.com/connectrpc/connect-kotlin) so generating that part of the SDK that is compatible with Java should be possible.

All interaction with the sandbox and API can also be done with just HTTP request, but it is way more convenient to use the generated clients, especially for the sandbox interactions.

ValentaTomas avatar Jul 26 '24 14:07 ValentaTomas

Here are some additional notes about generating custom SDKs. Closing the issue for now.

ValentaTomas avatar Mar 17 '25 23:03 ValentaTomas