- Run postman documentation
- HTTP Authentication, scheme: bearer
POST /photos
Body Parameters
title: Beach
photo_url: https://images.unsplash.com/photo-1707343843598-39755549ac9a?q=80&w=2832&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D
caption: Foto Pantai
Name | Location | Type | Required | Description |
---|---|---|---|---|
body | body | object | no | none |
» title | body | string | yes | none |
» photo_url | body | string | yes | none |
» caption | body | string | yes | none |
Response Examples
Create First Photo
{
"ID": 1,
"CreatedAt": "2024-02-16T09:20:56.460191+07:00",
"UpdatedAt": "2024-02-16T09:20:56.460191+07:00",
"DeletedAt": null,
"title": "Foto Pertama",
"photo_url": "https://images.unsplash.com/photo-1679065949530-7bb1fba3ccb3?q=80&w=2787&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"caption": "ini adalah foto pertama aink cuy",
"UserID": 1,
"User": null
}
HTTP Status Code | Meaning | Description | Data schema |
---|---|---|---|
201 | Created | Create First Photo | Inline |
HTTP Status Code 201
Name | Type | Required | Restrictions | Title | description |
---|---|---|---|---|---|
» ID | integer | true | none | none | |
» CreatedAt | string | true | none | none | |
» UpdatedAt | string | true | none | none | |
» DeletedAt | null | true | none | none | |
» title | string | true | none | none | |
» photo_url | string | true | none | none | |
» caption | string | true | none | none | |
» UserID | integer | true | none | none | |
» User | null | true | none | none |
GET /photos
Response Examples
Success Get All Photo
[
{
"ID": 1,
"CreatedAt": "2024-02-16T09:20:56.460191+07:00",
"UpdatedAt": "2024-02-16T09:20:56.460191+07:00",
"DeletedAt": null,
"title": "Foto Pertama",
"photo_url": "https://images.unsplash.com/photo-1679065949530-7bb1fba3ccb3?q=80&w=2787&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"caption": "ini adalah foto pertama aink cuy",
"UserID": 1,
"User": null
},
{
"ID": 2,
"CreatedAt": "2024-02-16T09:23:28.78337+07:00",
"UpdatedAt": "2024-02-16T09:23:28.78337+07:00",
"DeletedAt": null,
"title": "Beach",
"photo_url": "https://images.unsplash.com/photo-1707343843598-39755549ac9a?q=80&w=2832&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"caption": "Foto Pantai",
"UserID": 1,
"User": null
}
]
Failed not login
{
"error_message": "sign in to proceed",
"error_status": "Unauthorized"
}
HTTP Status Code | Meaning | Description | Data schema |
---|---|---|---|
201 | Created | Success Get All Photo | Inline |
401 | Unauthorized | Failed not login | Inline |
HTTP Status Code 201
Name | Type | Required | Restrictions | Title | description |
---|---|---|---|---|---|
» ID | integer | true | none | none | |
» CreatedAt | string | true | none | none | |
» UpdatedAt | string | true | none | none | |
» DeletedAt | null | true | none | none | |
» title | string | true | none | none | |
» photo_url | string | true | none | none | |
» caption | string | true | none | none | |
» UserID | integer | true | none | none | |
» User | null | true | none | none |
HTTP Status Code 401
Name | Type | Required | Restrictions | Title | description |
---|---|---|---|---|---|
» error_message | string | true | none | none | |
» error_status | string | true | none | none |
GET /photos/1
Response Examples
Get One Photo
{
"ID": 1,
"CreatedAt": "2024-02-16T09:20:56.460191+07:00",
"UpdatedAt": "2024-02-16T09:20:56.460191+07:00",
"DeletedAt": null,
"title": "Foto Pertama",
"photo_url": "https://images.unsplash.com/photo-1679065949530-7bb1fba3ccb3?q=80&w=2787&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"caption": "ini adalah foto pertama aink cuy",
"UserID": 1,
"User": null
}
HTTP Status Code | Meaning | Description | Data schema |
---|---|---|---|
201 | Created | Get One Photo | Inline |
HTTP Status Code 201
Name | Type | Required | Restrictions | Title | description |
---|---|---|---|---|---|
» ID | integer | true | none | none | |
» CreatedAt | string | true | none | none | |
» UpdatedAt | string | true | none | none | |
» DeletedAt | null | true | none | none | |
» title | string | true | none | none | |
» photo_url | string | true | none | none | |
» caption | string | true | none | none | |
» UserID | integer | true | none | none | |
» User | null | true | none | none |
PUT /photos/1
Body Parameters
title: Judulnya ganti
caption: Captionnya ganti
photo_url: https://images.unsplash.com/photo-1707696199186-d26b0f779f30?q=80&w=1828&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D
Name | Location | Type | Required | Description |
---|---|---|---|---|
body | body | object | no | none |
» title | body | string | yes | none |
» caption | body | string | yes | none |
» photo_url | body | string | yes | none |
Response Examples
Update Photo
{
"ID": 1,
"CreatedAt": "0001-01-01T00:00:00Z",
"UpdatedAt": "2024-02-16T09:34:12.39539+07:00",
"DeletedAt": null,
"title": "Judulnya ganti",
"photo_url": "https://images.unsplash.com/photo-1707696199186-d26b0f779f30?q=80&w=1828&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"caption": "Captionnya ganti",
"UserID": 1,
"User": null
}
HTTP Status Code | Meaning | Description | Data schema |
---|---|---|---|
201 | Created | Update Photo | Inline |
HTTP Status Code 201
Name | Type | Required | Restrictions | Title | description |
---|---|---|---|---|---|
» ID | integer | true | none | none | |
» CreatedAt | string | true | none | none | |
» UpdatedAt | string | true | none | none | |
» DeletedAt | null | true | none | none | |
» title | string | true | none | none | |
» photo_url | string | true | none | none | |
» caption | string | true | none | none | |
» UserID | integer | true | none | none | |
» User | null | true | none | none |
DELETE /photos/3
Response Examples
Delete Photo
{
"message": "photo with id 3 has been successfully deleted"
}
HTTP Status Code | Meaning | Description | Data schema |
---|---|---|---|
201 | Created | Delete Photo | Inline |
HTTP Status Code 201
Name | Type | Required | Restrictions | Title | description |
---|---|---|---|---|---|
» message | string | true | none | none |
POST /users/register
Body Parameters
username: farras
email: [email protected]
password: "123456"
age: "26"
Name | Location | Type | Required | Description |
---|---|---|---|---|
body | body | object | no | none |
» username | body | string | yes | none |
body | string | yes | none | |
» password | body | string | yes | none |
» age | body | string | yes | none |
Response Examples
Register MyGram
{
"age": 26,
"email": "[email protected]",
"id": 2,
"username": "farras"
}
Failed Register MyGram
{
"error": "Bad Request",
"message": "Age must be greater than 8"
}
HTTP Status Code | Meaning | Description | Data schema |
---|---|---|---|
201 | Created | Register MyGram | Inline |
400 | Bad Request | Failed Register MyGram | Inline |
HTTP Status Code 201
Name | Type | Required | Restrictions | Title | description |
---|---|---|---|---|---|
» age | integer | true | none | none | |
string | true | none | none | ||
» id | integer | true | none | none | |
» username | string | true | none | none |
HTTP Status Code 400
Name | Type | Required | Restrictions | Title | description |
---|---|---|---|---|---|
» error | string | true | none | none | |
» message | string | true | none | none |
POST /users/login
Body Parameters
email: [email protected]
password: "123456"
Name | Location | Type | Required | Description |
---|---|---|---|---|
body | body | object | no | none |
body | string | yes | none | |
» password | body | string | yes | none |
Response Examples
Login MyGram
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFsZmFAbWFpbC5jb20iLCJpZCI6MX0.CruDbZWyA_ygWV_1TwVEwwBR8n26V7ePvNcI5vWtSVg"
}
HTTP Status Code | Meaning | Description | Data schema |
---|---|---|---|
200 | OK | Login MyGram | Inline |
HTTP Status Code 200
Name | Type | Required | Restrictions | Title | description |
---|---|---|---|---|---|
» token | string | true | none | none |
POST /comments/1
Body Parameters
message: coba comment foto pertama
Name | Location | Type | Required | Description |
---|---|---|---|---|
body | body | object | no | none |
» message | body | string | yes | none |
Response Examples
Post Comment
{
"ID": 18,
"CreatedAt": "2024-02-16T10:44:31.243673+07:00",
"UpdatedAt": "2024-02-16T10:44:31.243673+07:00",
"DeletedAt": null,
"message": "coba comment foto pertama",
"UserID": 1,
"User": null,
"PhotoID": 1,
"Photo": null
}
HTTP Status Code | Meaning | Description | Data schema |
---|---|---|---|
201 | Created | Post Comment | Inline |
HTTP Status Code 201
Name | Type | Required | Restrictions | Title | description |
---|---|---|---|---|---|
» ID | integer | true | none | none | |
» CreatedAt | string | true | none | none | |
» UpdatedAt | string | true | none | none | |
» DeletedAt | null | true | none | none | |
» message | string | true | none | none | |
» UserID | integer | true | none | none | |
» User | null | true | none | none | |
» PhotoID | integer | true | none | none | |
» Photo | null | true | none | none |
GET /comments
Body Parameters
{}
Name | Location | Type | Required | Description |
---|---|---|---|---|
body | body | object | no | none |
Response Examples
Get All Comment
{
"comments": [
{
"ID": 14,
"CreatedAt": "2024-02-16T10:36:28.712273+07:00",
"UpdatedAt": "2024-02-16T10:36:28.712273+07:00",
"DeletedAt": null,
"message": "coba comment foto pertama",
"UserID": 1,
"User": {
"ID": 1,
"CreatedAt": "2024-02-13T16:18:36.717295+07:00",
"UpdatedAt": "2024-02-13T16:18:36.717295+07:00",
"DeletedAt": null,
"username": "alfa",
"email": "[email protected]",
"password": "$2a$08$xunMy1yQGACQSwKTzwWusuCM1v4c13IlQKXkxEpfoez93JqYC4ndm",
"age": 9,
"photos": null,
"comments": null,
"social_media": null
},
"PhotoID": 1,
"Photo": {
"ID": 1,
"CreatedAt": "2024-02-16T09:20:56.460191+07:00",
"UpdatedAt": "2024-02-16T09:34:12.39539+07:00",
"DeletedAt": null,
"title": "Judulnya ganti",
"photo_url": "https://images.unsplash.com/photo-1707696199186-d26b0f779f30?q=80&w=1828&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"caption": "Captionnya ganti",
"UserID": 1,
"User": null
}
},
{
"ID": 16,
"CreatedAt": "2024-02-16T10:42:44.593117+07:00",
"UpdatedAt": "2024-02-16T11:04:04.363957+07:00",
"DeletedAt": null,
"message": "Update comment dulu",
"UserID": 1,
"User": {
"ID": 1,
"CreatedAt": "2024-02-13T16:18:36.717295+07:00",
"UpdatedAt": "2024-02-13T16:18:36.717295+07:00",
"DeletedAt": null,
"username": "alfa",
"email": "[email protected]",
"password": "$2a$08$xunMy1yQGACQSwKTzwWusuCM1v4c13IlQKXkxEpfoez93JqYC4ndm",
"age": 9,
"photos": null,
"comments": null,
"social_media": null
},
"PhotoID": 1,
"Photo": {
"ID": 1,
"CreatedAt": "2024-02-16T09:20:56.460191+07:00",
"UpdatedAt": "2024-02-16T09:34:12.39539+07:00",
"DeletedAt": null,
"title": "Judulnya ganti",
"photo_url": "https://images.unsplash.com/photo-1707696199186-d26b0f779f30?q=80&w=1828&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"caption": "Captionnya ganti",
"UserID": 1,
"User": null
}
},
{
"ID": 17,
"CreatedAt": "2024-02-16T10:42:47.696695+07:00",
"UpdatedAt": "2024-02-16T10:42:47.696695+07:00",
"DeletedAt": null,
"message": "coba comment foto pertama",
"UserID": 1,
"User": {
"ID": 1,
"CreatedAt": "2024-02-13T16:18:36.717295+07:00",
"UpdatedAt": "2024-02-13T16:18:36.717295+07:00",
"DeletedAt": null,
"username": "alfa",
"email": "[email protected]",
"password": "$2a$08$xunMy1yQGACQSwKTzwWusuCM1v4c13IlQKXkxEpfoez93JqYC4ndm",
"age": 9,
"photos": null,
"comments": null,
"social_media": null
},
"PhotoID": 1,
"Photo": {
"ID": 1,
"CreatedAt": "2024-02-16T09:20:56.460191+07:00",
"UpdatedAt": "2024-02-16T09:34:12.39539+07:00",
"DeletedAt": null,
"title": "Judulnya ganti",
"photo_url": "https://images.unsplash.com/photo-1707696199186-d26b0f779f30?q=80&w=1828&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"caption": "Captionnya ganti",
"UserID": 1,
"User": null
}
},
{
"ID": 18,
"CreatedAt": "2024-02-16T10:44:31.243673+07:00",
"UpdatedAt": "2024-02-16T10:44:31.243673+07:00",
"DeletedAt": null,
"message": "coba comment foto pertama",
"UserID": 1,
"User": {
"ID": 1,
"CreatedAt": "2024-02-13T16:18:36.717295+07:00",
"UpdatedAt": "2024-02-13T16:18:36.717295+07:00",
"DeletedAt": null,
"username": "alfa",
"email": "[email protected]",
"password": "$2a$08$xunMy1yQGACQSwKTzwWusuCM1v4c13IlQKXkxEpfoez93JqYC4ndm",
"age": 9,
"photos": null,
"comments": null,
"social_media": null
},
"PhotoID": 1,
"Photo": {
"ID": 1,
"CreatedAt": "2024-02-16T09:20:56.460191+07:00",
"UpdatedAt": "2024-02-16T09:34:12.39539+07:00",
"DeletedAt": null,
"title": "Judulnya ganti",
"photo_url": "https://images.unsplash.com/photo-1707696199186-d26b0f779f30?q=80&w=1828&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"caption": "Captionnya ganti",
"UserID": 1,
"User": null
}
},
{
"ID": 19,
"CreatedAt": "2024-02-16T10:51:25.601451+07:00",
"UpdatedAt": "2024-02-16T10:51:25.601451+07:00",
"DeletedAt": null,
"message": "Komentar kedua nih",
"UserID": 1,
"User": {
"ID": 1,
"CreatedAt": "2024-02-13T16:18:36.717295+07:00",
"UpdatedAt": "2024-02-13T16:18:36.717295+07:00",
"DeletedAt": null,
"username": "alfa",
"email": "[email protected]",
"password": "$2a$08$xunMy1yQGACQSwKTzwWusuCM1v4c13IlQKXkxEpfoez93JqYC4ndm",
"age": 9,
"photos": null,
"comments": null,
"social_media": null
},
"PhotoID": 1,
"Photo": {
"ID": 1,
"CreatedAt": "2024-02-16T09:20:56.460191+07:00",
"UpdatedAt": "2024-02-16T09:34:12.39539+07:00",
"DeletedAt": null,
"title": "Judulnya ganti",
"photo_url": "https://images.unsplash.com/photo-1707696199186-d26b0f779f30?q=80&w=1828&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"caption": "Captionnya ganti",
"UserID": 1,
"User": null
}
}
]
}
HTTP Status Code | Meaning | Description | Data schema |
---|---|---|---|
200 | OK | Get All Comment | Inline |
HTTP Status Code 200
Name | Type | Required | Restrictions | Title | description |
---|---|---|---|---|---|
» comments | [object] | true | none | none | |
»» ID | integer | true | none | none | |
»» CreatedAt | string | true | none | none | |
»» UpdatedAt | string | true | none | none | |
»» DeletedAt | null | true | none | none | |
»» message | string | true | none | none | |
»» UserID | integer | true | none | none | |
»» User | object | true | none | none | |
»»» ID | integer | true | none | none | |
»»» CreatedAt | string | true | none | none | |
»»» UpdatedAt | string | true | none | none | |
»»» DeletedAt | null | true | none | none | |
»»» username | string | true | none | none | |
string | true | none | none | ||
»»» password | string | true | none | none | |
»»» age | integer | true | none | none | |
»»» photos | null | true | none | none | |
»»» comments | null | true | none | none | |
»»» social_media | null | true | none | none | |
»» PhotoID | integer | true | none | none | |
»» Photo | object | true | none | none | |
»»» ID | integer | true | none | none | |
»»» CreatedAt | string | true | none | none | |
»»» UpdatedAt | string | true | none | none | |
»»» DeletedAt | null | true | none | none | |
»»» title | string | true | none | none | |
»»» photo_url | string | true | none | none | |
»»» caption | string | true | none | none | |
»»» UserID | integer | true | none | none | |
»»» User | null | true | none | none |
DELETE /comments/15
Response Examples
Delete Comment
{
"message": "comment with id 15 has been successfully deleted"
}
HTTP Status Code | Meaning | Description | Data schema |
---|---|---|---|
201 | Created | Delete Comment | Inline |
HTTP Status Code 201
Name | Type | Required | Restrictions | Title | description |
---|---|---|---|---|---|
» message | string | true | none | none |
PUT /comments/16
Body Parameters
message: Update comment dulu
Name | Location | Type | Required | Description |
---|---|---|---|---|
body | body | object | no | none |
» message | body | string | yes | none |
Response Examples
Update Comment
{
"ID": 16,
"CreatedAt": "0001-01-01T00:00:00Z",
"UpdatedAt": "2024-02-16T11:04:04.363957+07:00",
"DeletedAt": null,
"message": "Update comment dulu",
"UserID": 1,
"User": null,
"PhotoID": 0,
"Photo": null
}
HTTP Status Code | Meaning | Description | Data schema |
---|---|---|---|
201 | Created | Update Comment | Inline |
HTTP Status Code 201
Name | Type | Required | Restrictions | Title | description |
---|---|---|---|---|---|
» ID | integer | true | none | none | |
» CreatedAt | string | true | none | none | |
» UpdatedAt | string | true | none | none | |
» DeletedAt | null | true | none | none | |
» message | string | true | none | none | |
» UserID | integer | true | none | none | |
» User | null | true | none | none | |
» PhotoID | integer | true | none | none | |
» Photo | null | true | none | none |
GET /comments/14
Body Parameters
{}
Name | Location | Type | Required | Description |
---|---|---|---|---|
body | body | object | no | none |
Response Examples
Get One Comment
{
"comment": {
"ID": 14,
"CreatedAt": "2024-02-16T10:36:28.712273+07:00",
"UpdatedAt": "2024-02-16T10:36:28.712273+07:00",
"DeletedAt": null,
"message": "coba comment foto pertama",
"UserID": 1,
"User": {
"ID": 1,
"CreatedAt": "2024-02-13T16:18:36.717295+07:00",
"UpdatedAt": "2024-02-13T16:18:36.717295+07:00",
"DeletedAt": null,
"username": "alfa",
"email": "[email protected]",
"password": "$2a$08$xunMy1yQGACQSwKTzwWusuCM1v4c13IlQKXkxEpfoez93JqYC4ndm",
"age": 9,
"photos": null,
"comments": null,
"social_media": null
},
"PhotoID": 1,
"Photo": {
"ID": 1,
"CreatedAt": "2024-02-16T09:20:56.460191+07:00",
"UpdatedAt": "2024-02-16T09:34:12.39539+07:00",
"DeletedAt": null,
"title": "Judulnya ganti",
"photo_url": "https://images.unsplash.com/photo-1707696199186-d26b0f779f30?q=80&w=1828&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"caption": "Captionnya ganti",
"UserID": 1,
"User": null
}
}
}
HTTP Status Code | Meaning | Description | Data schema |
---|---|---|---|
200 | OK | Get One Comment | Inline |
HTTP Status Code 200
Name | Type | Required | Restrictions | Title | description |
---|---|---|---|---|---|
» comment | object | true | none | none | |
»» ID | integer | true | none | none | |
»» CreatedAt | string | true | none | none | |
»» UpdatedAt | string | true | none | none | |
»» DeletedAt | null | true | none | none | |
»» message | string | true | none | none | |
»» UserID | integer | true | none | none | |
»» User | object | true | none | none | |
»»» ID | integer | true | none | none | |
»»» CreatedAt | string | true | none | none | |
»»» UpdatedAt | string | true | none | none | |
»»» DeletedAt | null | true | none | none | |
»»» username | string | true | none | none | |
string | true | none | none | ||
»»» password | string | true | none | none | |
»»» age | integer | true | none | none | |
»»» photos | null | true | none | none | |
»»» comments | null | true | none | none | |
»»» social_media | null | true | none | none | |
»» PhotoID | integer | true | none | none | |
»» Photo | object | true | none | none | |
»»» ID | integer | true | none | none | |
»»» CreatedAt | string | true | none | none | |
»»» UpdatedAt | string | true | none | none | |
»»» DeletedAt | null | true | none | none | |
»»» title | string | true | none | none | |
»»» photo_url | string | true | none | none | |
»»» caption | string | true | none | none | |
»»» UserID | integer | true | none | none | |
»»» User | null | true | none | none |
POST /socialmedias
Body Parameters
name: Alfa
social_media_url: [email protected]
Name | Location | Type | Required | Description |
---|---|---|---|---|
body | body | object | no | none |
» name | body | string | yes | none |
» social_media_url | body | string | yes | none |
Response Examples
Create Social Media
{
"ID": 1,
"CreatedAt": "2024-02-16T11:32:53.000673+07:00",
"UpdatedAt": "2024-02-16T11:32:53.000673+07:00",
"DeletedAt": null,
"name": "Alfa",
"social_media_url": "[email protected]",
"UserID": 1,
"User": null
}
HTTP Status Code | Meaning | Description | Data schema |
---|---|---|---|
201 | Created | Create Social Media | Inline |
HTTP Status Code 201
Name | Type | Required | Restrictions | Title | description |
---|---|---|---|---|---|
» ID | integer | true | none | none | |
» CreatedAt | string | true | none | none | |
» UpdatedAt | string | true | none | none | |
» DeletedAt | null | true | none | none | |
» name | string | true | none | none | |
» social_media_url | string | true | none | none | |
» UserID | integer | true | none | none | |
» User | null | true | none | none |
GET /socialmedias
Response Examples
Get All Social Media
[
{
"ID": 1,
"CreatedAt": "2024-02-16T11:32:53.000673+07:00",
"UpdatedAt": "2024-02-16T11:32:53.000673+07:00",
"DeletedAt": null,
"name": "Alfa",
"social_media_url": "[email protected]",
"UserID": 1,
"User": null
},
{
"ID": 2,
"CreatedAt": "2024-02-16T12:03:01.119968+07:00",
"UpdatedAt": "2024-02-16T12:03:01.119968+07:00",
"DeletedAt": null,
"name": "anjoy",
"social_media_url": "[email protected]",
"UserID": 1,
"User": null
},
{
"ID": 3,
"CreatedAt": "2024-02-16T12:03:13.324375+07:00",
"UpdatedAt": "2024-02-16T12:05:06.03972+07:00",
"DeletedAt": null,
"name": "bimo",
"social_media_url": "[email protected]",
"UserID": 1,
"User": null
}
]
HTTP Status Code | Meaning | Description | Data schema |
---|---|---|---|
201 | Created | Get All Social Media | Inline |
HTTP Status Code 201
Name | Type | Required | Restrictions | Title | description |
---|---|---|---|---|---|
» ID | integer | true | none | none | |
» CreatedAt | string | true | none | none | |
» UpdatedAt | string | true | none | none | |
» DeletedAt | null | true | none | none | |
» name | string | true | none | none | |
» social_media_url | string | true | none | none | |
» UserID | integer | true | none | none | |
» User | null | true | none | none |
GET /socialmedias/1
Response Examples
Get One Social Media
{
"ID": 1,
"CreatedAt": "2024-02-16T11:32:53.000673+07:00",
"UpdatedAt": "2024-02-16T11:32:53.000673+07:00",
"DeletedAt": null,
"name": "Alfa",
"social_media_url": "[email protected]",
"UserID": 1,
"User": null
}
HTTP Status Code | Meaning | Description | Data schema |
---|---|---|---|
201 | Created | Get One Social Media | Inline |
HTTP Status Code 201
Name | Type | Required | Restrictions | Title | description |
---|---|---|---|---|---|
» ID | integer | true | none | none | |
» CreatedAt | string | true | none | none | |
» UpdatedAt | string | true | none | none | |
» DeletedAt | null | true | none | none | |
» name | string | true | none | none | |
» social_media_url | string | true | none | none | |
» UserID | integer | true | none | none | |
» User | null | true | none | none |
PUT /socialmedias/3
Body Parameters
name: bimo
social_media_url: [email protected]
Name | Location | Type | Required | Description |
---|---|---|---|---|
body | body | object | no | none |
» name | body | string | yes | none |
» social_media_url | body | string | yes | none |
Response Examples
Update Social Media
{
"ID": 3,
"CreatedAt": "0001-01-01T00:00:00Z",
"UpdatedAt": "2024-02-16T12:05:06.03972+07:00",
"DeletedAt": null,
"name": "bimo",
"social_media_url": "[email protected]",
"UserID": 1,
"User": null
}
HTTP Status Code | Meaning | Description | Data schema |
---|---|---|---|
201 | Created | Update Social Media | Inline |
HTTP Status Code 201
Name | Type | Required | Restrictions | Title | description |
---|---|---|---|---|---|
» ID | integer | true | none | none | |
» CreatedAt | string | true | none | none | |
» UpdatedAt | string | true | none | none | |
» DeletedAt | null | true | none | none | |
» name | string | true | none | none | |
» social_media_url | string | true | none | none | |
» UserID | integer | true | none | none | |
» User | null | true | none | none |
DELETE /socialmedias/2
Response Examples
Delete Social Media
{
"message": "socialmedia with id 2 has been successfully deleted"
}
HTTP Status Code | Meaning | Description | Data schema |
---|---|---|---|
201 | Created | Delete Social Media | Inline |
HTTP Status Code 201
Name | Type | Required | Restrictions | Title | description |
---|---|---|---|---|---|
» message | string | true | none | none |