Create a new lab
POST
/labs
const url = 'https://antimony.example.com/api/labs';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"endTime":"example","name":"example","startTime":"example","topologyId":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://antimony.example.com/api/labs \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "endTime": "example", "name": "example", "startTime": "example", "topologyId": "example" }'Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”The lab
Media typeapplication/json
object
endTime
EndTime is deliberately optional. A lab created without one runs indefinitely.
string
name
required
string
startTime
required
string
topologyId
required
string
Example generated
{ "endTime": "example", "name": "example", "startTime": "example", "topologyId": "example"}Responses
Section titled “Responses”The ID of the newly created lab
Media typeapplication/json
object
payload
string
Example generated
{ "payload": "example"}The user isn’t authorized
Media typeapplication/json
Access to the resource was denied. Details in the request body.
Media typeapplication/json
object
code
integer
message
string
Example generated
{ "code": 1, "message": "example"}The provided access token is not valid
Media typeapplication/json