Skip to content

0.1.0

Latest
Compare
Choose a tag to compare
@natan-dias natan-dias released this 15 Dec 23:47
· 4 commits to main since this release

API Documentation for Personal Knowledge Base Simple API

Overview

This API is designed to manage a personal knowledge base, allowing users to store and retrieve commands, categories, and their respective descriptions.

Endpoints

Categories

  • GET /categories: Retrieves a list of all categories.
  • POST /categories: Creates a new category.
  • GET /categories/int:category_id: Retrieves a specific category by ID.
  • DELETE /categories/int:category_id: Deletes a category by ID.

Commands

  • GET /categories/int:category_id/commands: Retrieves a list of commands for a specific category.
  • POST /categories/int:category_id/commands: Creates a new command for a specific category.
  • GET /categories/int:category_id/commands/int:id: Retrieves a specific command by ID.
  • DELETE /categories/int:category_id/commands/int:id: Deletes a command by ID.
  • PUT /categories/int:category_id/commands/int:id: Updates a command by ID.

Request and Response Formats

  • Request bodies should be in JSON format.
  • Response bodies will be in JSON format.

Request Parameters

  • kb_post_args:
    • id: ID of the category (integer)
    • command: Command to be stored (string)
    • command_description: Description of the command (string)
  • kb_update_args:
    • command: Command to be updated (string)
    • command_description: Description of the command (string)

Response Fields

  • category_resource_fields:
    • id: ID of the category (integer)
    • category: Name of the category (string)
  • command_resource_fields:
    • id: ID of the command (integer)
    • category_id: ID of the category (integer)
    • category: Name of the category (string)
    • command: Command (string)
    • command_description: Description of the command (string)

Error Handling

  • Errors will be returned in JSON format with a corresponding HTTP status code.