POST
/
api
/
servers
/
{server_name}
/
run-code
curl --request POST \
  --url https://dashboard.amdatascience.com/api/servers/{server_name}/run-code \
  --header 'Content-Type: application/json' \
  --header 'apiKey: <api-key>' \
  --data '{
  "code": "print('\''hello'\'')",
  "kernel_name": "api-kernel"
}'
{
  "content": {
    "cell_type": "code",
    "execution_count": 1,
    "metadata": {},
    "outputs": [
      {
        "name": "stdout",
        "output_type": "stream",
        "text": "hello\n"
      }
    ],
    "source": "print('hello')"
  },
  "status": "success"
}

Authorizations

apiKey
string
header
required

Path Parameters

server_name
string
required

Body

application/json
code
string
Example:

"print('hello')"

kernel_name
string
Example:

"api-kernel"

Response

200 - application/json
Run Code
content
object
status
string
Example:

"success"