Maps

Maps

Endpoints for managing map resources.

GET /api/maps

  • Description: Retrieves a list of all maps.

  • Parameters: None

  • Example Request:

    GET /api/maps
  • Response:

    • 200 OK: Returns an array of map objects.

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

GET /api/maps/{id}

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

  • Parameters:

    • id (integer): ID of the map.

  • Example Request:

    GET /api/maps/1
  • Response:

    • 200 OK: Returns the map object.

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

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

POST /api/maps

  • Description: Creates a new map.

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

  • Request Body:

  • Example Request:

  • Response:

    • 201 Created: Returns the created map object.

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

PUT /api/maps/{id}

  • Description: Updates an existing map by ID.

  • Parameters:

    • id (integer): ID of the map.

  • Request Body:

  • Example Request:

  • Response:

    • 200 OK: Returns the updated map object.

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

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

DELETE /api/maps/{id}

  • Description: Deletes a map by ID.

  • Parameters:

    • id (integer): ID of the map.

  • Example Request:

  • Response:

    • 200 OK: Confirmation of deletion.

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

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

Last updated