Create Video

Create Video

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/video

Body : JSON

{
		"title": "New Video",
		"video_url": "https://youtu.be/_IzOqfrLc0o",
		"hd_quality": true,
		"island_id": 1,
		"province_id": 1
}
title*Required
string

Title of video.

video_url*Required
string

Video URL

hd_quality
boolean

Video quality

island_id
number

Video Island ID

province_id
number

Video Province ID

Response : 200 - OK

{
	"message": "Success add video"
}

Response : 422 - Unprocessable Content

{
	"error": [
		{
			"code": "too_small",
			"minimum": 1,
			"type": "string",
			"inclusive": true,
			"exact": false,
			"message": "Title is required",
			"path": ["title"]
		},
		{
			"code": "too_small",
			"minimum": 1,
			"type": "string",
			"inclusive": true,
			"exact": false,
			"message": "Video URL is required",
			"path": ["video_url"]
		}
	]
}

Response : 500 - Server Error

Internal Server Error