Skip to content

Tasks API: Implement POST /tasks #898

@mafredri

Description

@mafredri

Implement create endpoint.

Base path: /api/v2/organizations/{org}/members/{user}

Behavior

  • Body: { name?, template_id? | recipe_id?, parameters?: { [k]: string }, input?: string }
  • Require one of template_id or recipe_id.
  • Map input to prompt parameter (TBD constant).
  • Generate name if absent.
  • Return task details.
  • MVP: template-based creation first, recipe-based creation post-MVP.

Request model

  • name?: string
  • template_id?: uuid
  • recipe_id?: uuid (post-MVP)
  • parameters?: map[string]string
  • input?: string (shorthand for prompt)

Response model (task)

  • id: uuid
  • organization_id: uuid
  • owner_id: uuid
  • display_name: string
  • template_id: uuid
  • recipe_id?: uuid (post-MVP)
  • workspace_id?: uuid
  • status: queued | working | idle | paused | completed | failed
  • created_at, updated_at, started_at?, completed_at?
  • last_error?: string

References: #838

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions