PUT
/ratchet/tasks/{name}
const url = 'http://localhost:8000/ratchet/tasks/example';const options = {method: 'PUT'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://localhost:8000/ratchet/tasks/exampleCreate or replace an API task: 200 {task, spec_hash, changed, created}, 422 {errors} for a bad spec, 403 for
a built-in or file task, 409 when the registry (or the mock demo’s share of it) is full.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”name
required
Name
string
Header Parameters
Section titled “Header Parameters”Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Example generated
exampleValidation 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" } ]}