Create Island

Create Island

To create the data in the specified collection with the specified parameters. When a JSON object is saved, the object properties are automatically added to the collection you specified.

Method : POST

URL : /api/island

Body : JSON

{
	"name": "New Island",
	"image_url": "https://images.unsplash.com/photo-1682687220063-4742bd7fd538?auto=format&fit=crop&q=60&w=500"
}
name*Required
string

Island name.

image_url*Required
string

Island image URL

Response : 200 - OK

{
  "message": "Success add island"
}

Response : 422 - Unprocessable Content

{
    "error": [
        {
            "code": "too_small",
            "minimum": 1,
            "type": "string",
            "inclusive": true,
            "exact": false,
            "message": "Name is required",
            "path": [
                "name"
            ]
        },
        {
            "code": "too_small",
            "minimum": 1,
            "type": "string",
            "inclusive": true,
            "exact": false,
            "message": "Image URL is required",
            "path": [
                "image_url"
            ]
        }
    ]
}

Response : 500 - Server Error

Internal Server Error