nextcloud / nextcloud/cookbook

Finalize API for version 1.0

Open
#577 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

API documentation maintenance meta and development
Dominant language
HTML
Stars
641
Forks
113
Avg merge
21h 31m
Merged PRs (30d)
26

Description

A stable version of the public API should be defined for the 1.0.0 version of the app.

As far as I can see, we currently have the following endpoints which should be brought into a clean, consistent state if necessary to form a stable basis for 1.0.

All endpoints are relative to the /app/cookbook prefix.

End-user interface

  • HTML index page (/ GET)

API

  • getApiVersion (/api/version GET)

Recipes

  • get all recipes (/api/recipes GET)
  • get single recipe (/api/recipes/{id} GET)
  • create new recipe (/api/recipes POST)
  • Update recipe (/api/recipes/{id} PUT)
  • Remove a recipe (/api/recipes/{id} DELETE)
  • get all recipes by category (/api/category/{category} GET)
  • get all recipes by tags (/api/tags/{keywords} GET)
  • search (/api/search/{query} GET)
  • import (/import POST)
  • Get the image of a recipe (/recipe/{id}/image?size={size} GET)

Categories

  • get all categories (/categories GET)
  • update name (/api/category/{category} PUT)

Keywords

  • get all keywords (/keywords GET)

Configuration

  • read (/config GET)
  • update (/config POST)
  • reindexDatabase (/reindex POST)

Are we using any of those routes?

['name' => 'main#home', 'url' => '/home', 'verb' => 'GET'],
['name' => 'main#error', 'url' => '/error', 'verb' => 'GET'],
['name' => 'main#create', 'url' => '/recipes/create', 'verb' => 'GET'],
['name' => 'main#new', 'url' => '/recipes/create', 'verb' => 'POST'],
['name' => 'main#edit', 'url' => '/recipes/{id}/edit', 'verb' => 'GET', 'requirements' => ['id' => '\d+']],
['name' => 'main#update', 'url' => '/recipes/{id}/edit', 'verb' => 'PUT', 'requirements' => ['id' => '\d+']],
['name' => 'main#recipe', 'url' => '/recipes/{id}', 'verb' => 'GET', 'requirements' => ['id' => '\d+']],

This issue is supposed to be a discussion of the v1 API.

  • Which endpoints can be removed?
  • Is the structure clear and consistent?
  • What should be changed?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the listed /api/version, recipe, category, tags, search, import, image, keywords, config, and reindex routes alongside the main#home, main#error, main#create, main#new, main#edit, main#update, and main#recipe entries. Decide which routes remain in the v1 contract and document consistent structure and removals; done when the endpoint set and decisions are agreed.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.