One turn of the conversation
post/hosting/coder/projects/{id}/turns
One turn of the conversation: say what to make or change, and the coder works on the project's files with the library, runs the automatic checks, repairs what it can and saves a checkpoint. The answer says whether it was saved, asked a question, proposed three design directions to pick from, only answered, or could not be saved (the project is then as it was). With Accept: text/event-stream the same turn arrives as events while it works (status, say, tool, fixed, checkpoint, question, directions, notice, preview, then result). A saved turn by a signed-in person is also sent to the project's preview when Praecise Cloud is connected.
Before you call
- Credential
Authorization: Bearer $KEY- Scope
hosting:write- Graphql
Mutation.hostingCoderTurnCreate- Sdk
hosting.coderTurn.create- Cli
hosting coder turn create
Parameters
- idstring (uuid)requiredIn the path
Request bodyapplication/json, required
- textstringrequiredWhat the person says: what to make, or what to change At most 8000 characters.
Responses
- 200application/jsonSuccess
- outcomestringrequiredOne of: saved, asked, directions, answered, not_saved, limit.
- replystringrequired
- checkpointobject
- idstringrequired
- projectIdstringrequired
- seqnumberrequired
- parentstring or nullrequired
- messagestringrequired
- restoresstring
- bystringrequired
- createdAtstringrequired
- filesnumberrequired
- questionobject
- textstringrequired
- choiceslist of stringrequired
- directionslist of objectThree design directions to pick from; the person answers with the name of one
- namestringrequiredAt most 40 characters.
- moodstringrequiredAt most 200 characters.
- themestringrequiredOne of: light, dark.
- accentobjectrequired
- huenumberrequiredAt least 0. At most 360.
- chromanumberrequiredAt least 0. At most 0.3.
- huenumberrequired
- radiusstringrequiredOne of: none, sm, md, lg, full.
- displaystringrequiredAt most 60 characters.
- bodystringrequiredAt most 60 characters.
- densitystringrequiredOne of: airy, regular, compact.
- motionstringrequiredOne of: still, gentle, lively.
- imagerystringAt most 160 characters.
- namestringrequired
- leftlist of object
- checkstringrequired
- severitystringrequiredOne of: error, advice.
- pathstringrequired
- linenumber
- messagestringrequired
- usageobjectrequired
- innumberrequired
- outnumberrequired
- estimatedbooleanrequired
- stepsnumberrequired
- previewobjectWhere the saved turn is being shown, when Praecise Cloud is connected and a person asked
- labelstringrequired
- urlstringrequired
- checkpointstringrequired
- bundlestringrequired
- jobstring or nullrequired
- statestringrequiredOne of: building, running, failed, archived.
- previewRefusedstringWhy the saved turn could not be shown, in Praecise Cloud's own words
- outcomestringrequired
- 400application/jsonThe request was malformed
- errorstringrequired
- messagestring
- 401application/jsonNo valid credential
- errorstringrequired
- messagestring
- 403application/jsonThe credential lacks the scope, origin or address
- errorstringrequired
- messagestring
- 429application/jsonOver the key's rate limit; see Retry-After
- errorstringrequired
- messagestring