prompt-serve icon indicating copy to clipboard operation
prompt-serve copied to clipboard

Complete API server

Open deadbits opened this issue 2 years ago • 1 comments

Complete Flask API server

  • [ ] endpoint to upload new prompts
  • [ ] validate uploaded prompts against schema
  • [ ] optionally put prompt into folder by category name
  • [ ] push new prompt to Git repo specified by config file
  • [ ] endpoint for retrieving stored prompts by category + name and UUID

deadbits avatar Jun 26 '23 20:06 deadbits

API Endpoints

  • GET {repo}/{category}/{prompt name} - return full prompt-serve file by name
  • GET {repo}/{uuid} - return full prompt-serve file by UUID
  • GET {repo}/{category}/{prompt name}?raw - return just the prompt text by name
  • GET {repo}/{uuid}?raw - return just prompt text by UUID
  • POST {repo} - commit prompt to repo (backend sorts prompt into category folder)
  • GET {repo}/_stats - return repo statistics
  • GET {repo}/_index - return repo file tree
  • GET {repo}/_index?{category} - return repo file tree for category
  • DELETE {repo}/{uuid} - delete prompt from repo by UUID
  • DELETE {repo}/path/to/prompt - delete prompt from repo by name

deadbits avatar Jun 28 '23 17:06 deadbits