Sets

GET /api/sets

  • Description: Retrieves a list of all sets.

  • Parameters: None

  • Example Request:

    GET /api/sets
  • Response:

    • 200 OK: Returns an array of set objects.

    • 4XX/5XX: Returns an error message if the request fails.

GET /api/sets/{id}

  • Description: Retrieves details of a specific set by ID.

  • Parameters:

    • id (integer): ID of the set.

  • Example Request:

    GET /api/sets/1
  • Response:

    • 200 OK: Returns the set object.

    • 404 Not Found: If the set with the specified ID does not exist.

    • 4XX/5XX: Returns an error message if the request fails.

POST /api/sets

  • Description: Creates a new set.

  • Parameters: None (Data is sent in the request body)

  • Request Body:

  • Example Request:

  • Response:

    • 201 Created: Returns the created set object.

    • 4XX/5XX: Returns an error message if the request fails.

PUT /api/sets/{id}

  • Description: Updates an existing set by ID.

  • Parameters:

    • id (integer): ID of the set.

  • Request Body:

  • Example Request:

  • Response:

    • 200 OK: Returns the updated set object.

    • 404 Not Found: If the set with the specified ID does not exist.

    • 4XX/5XX: Returns an error message if the request fails.

DELETE /api/sets/{id}

  • Description: Deletes a set by ID.

  • Parameters:

    • id (integer): ID of the set.

  • Example Request:

  • Response:

    • 200 OK: Confirmation of deletion.

    • 404 Not Found: If the set with the specified ID does not exist.

    • 4XX/5XX: Returns an error message if the request fails.

Last updated