Is it possible to start the codesandbox container programatically? #4759
-
Forking via API creates you a sandbox which in return gives you an id. The id can, therefore, be used to get the preview which we can attach in an iframe. Question is, containers sleep after x time of inactivity, and the only way it seems to start it is using the interface at codesandbox.io or a GET request to that let's say: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey. I've sent you an email regarding this. But let me copy it here as well for others. You can now programatically start a server side container with a normal http request.
The important thing is the Accept header. You can replace the node in the URL with your sandbox ID. |
Beta Was this translation helpful? Give feedback.
Hey. I've sent you an email regarding this. But let me copy it here as well for others.
You can now programatically start a server side container with a normal http request.
For example:
curl -H 'Accept: application/json' https://node.sse.codesandbox.io/
The important thing is the Accept header. You can replace the node in the URL with your sandbox ID.