Update an existing lab
PATCH
/labs/{id}
const url = 'https://antimony.example.com/api/labs/example';const options = { method: 'PATCH', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"endTime":"example","indefinite":true,"name":"example","startTime":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://antimony.example.com/api/labs/example \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "endTime": "example", "indefinite": true, "name": "example", "startTime": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
The ID of the lab to edit
Request Body
Section titled “Request Body”A partial lab with updated values
Media typeapplication/json
object
endTime
string
indefinite
Indefinite is used to explicitly mark a lab as running indefinitely. As all fields in this struct are optional, we can’t rely on [LabInPartial.EndTime] being nil as marking the lab as running indefinitely.
boolean
name
string
startTime
string
Example generated
{ "endTime": "example", "indefinite": true, "name": "example", "startTime": "example"}Responses
Section titled “Responses”OK
Media typeapplication/json
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 request was invalid. Details in the response 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