Servers
Run Code
Run Code
POST
/
api
/
servers
/
{server_name}
/
run-code
Run Code
Copy
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"
}'
Copy
{
"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
Body
application/json
Response
200 - application/json
Run Code
The response is of type object
.
Run Code
Copy
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"
}'
Copy
{
"content": {
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": "hello\n"
}
],
"source": "print('hello')"
},
"status": "success"
}
Assistant
Responses are generated using AI and may contain mistakes.