Servers
Run Code
Servers
Run Code
Run Code
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
Path Parameters
Response
200 - application/json
Run Code
Example:
"code"
Example:
1
Example:
"print('hello')"
Example:
"success"
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"
}