POST
/ratchet/cost/endpoint
const url = 'http://localhost:8000/ratchet/cost/endpoint';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '"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 http://localhost:8000/ratchet/cost/endpoint \ --header 'Content-Type: application/json' \ --data '"example"'Record the student endpoint going up or down ({"state": "up" | "down"}, optionally usd_per_hour per GPU,
gpus and a note), as python -m ratchet.cost endpoint does. Needs an admin key (open in mock mode without
admin keys, like the other management calls). up while up and down while down change nothing (changed
false).
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Body
Example generated
exampleResponses
Section titled “Responses”Successful Response
Media typeapplication/json
Response Cost Endpoint Ratchet Cost Endpoint Post
object
Example generated
{}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}