Event App Rest API Documentation

REST API for Event App

Base URI

http://yoshapp.com/eventApp/api/
API Methods
POST /signup
POST /signin
GET /logout/{system generated unique id of the user}
GET /categories
POST /event
GET /event/{unique id of the user}/delete/{event id}
GET /event/user/{unique id of the user}
GET /events/{unique id of the user}
GET /event/{event id}/user/{unique id of the user}
POST /event/update
POST /update/image
signup
POST /signup

This API is used to register new user for the app. The API accept JSON dectionary as request and return response in JSON dictionary.

Request body

Object
user_fname
string
Example:
User first name
user_lname
string
Example:
User last name
user_email
string
Example:
User email
user_password
string
Example:
User password
user_profilepic
string
Example:
It will be base64 image string for the email signup otherwise it will be profile image url for FB/twitter signup
user_type
string
Example:
It will be 0 for email signup and 1 for the social media(FB/Twitter) signup

Responses

200 OK
Body
Object
status
string
Example:
success
message
string
Example:
user detail is saved.
uid
string
Example:
System generated unique id to manage the session between the app and the API. Developer need to save this unique id locally to access other API
signin
POST /signin

This API is used to login the user inside the app. The API accept JSON request and return JSON response. Note: For social media signin there is no need to use this API. For social media signin developer should use the signup api instead of using the signin api from signup api developer can find the unique id and paas the user to the home page.

Request body

Object
user_email
string
Example:
User email
user_password
string
Example:
User password
user_type
string
Example:
It will be 0 for email signin

Responses

200 OK
Body
Object
status
string
Example:
success
uid
string
Example:
System generated unique id. Developer need to save this unique id locally to access other api.
email
string
Example:
User email
user_fname
string
Example:
User first name
user_lname
string
Example:
User last name
profile_image
string
Example:
User profile image url
logout
GET /logout/{system generated unique id of the user}

This api is used to terminate the session. There is no need of JSON dictionary only pass the udi of the user in the URL path. The response will be in JSON format.

Path variables

system generated unique id of the user
string optional

Responses

200 OK
Body
Object
status
string
Example:
sucess
message
string
Example:
User logged out.
categories
GET /categories

This api is used to fetch all the categories from the database. This is the GET api there is no need of posting any data on the server.

Responses

200 OK
Body
Object
cat_id
string
Example:
1
cat_name
string
Example:
party
create new event
POST /event

This api is used to create new event from the app. The event is created by a specific user.

Request parameters

user_uid
string required

System generated unique id of the user

cat_id
string required

Category id

event_description
string required

Event description

event_image
string required

Base64 string of the image

event_country
string required

Country of the event

event_title
string required

title of the event

event_date
string required

event date

event_state
string required

event state

event_city
string required

event city

event_phone_number
string required

event phone number

event_email
string required

event_email

Responses

200 OK
Body
Object
status
string
Example:
success
message
string
Example:
Event created successfully
event_id
string
Example:
event id
user_id
string
Example:
user id
cat_id
string
Example:
category id
event_description
string
Example:
event description
event_image
string
Example:
event image
event_country
string
Example:
event country
event_title
string
Example:
event title
event_date
string
Example:
event date
event_state
string
Example:
event state
event_city
string
Example:
event city
event_email
string
Example:
event email
event_phone_number
string
Example:
event phone number
user_profilepic
string
Example:
user profile pic
user_fname
string
Example:
user first name
user_lname
string
Example:
user last name
Delete event
GET /event/{unique id of the user}/delete/{event id}

This api is used to delete event. Developer only need to pass the uid of the user and event id in the URL path.

Path variables

unique id of the user
string optional
event id
string optional

Responses

200 OK
Body
Object
status
string
Example:
success
message
string
Example:
Event deleted successfully
User event
GET /event/user/{unique id of the user}

This api is used to get all the user events. Developer only need to pass the uid of the user in the url.

Path variables

unique id of the user
string optional

Responses

200 OK
Body
Object
event_id
string
Example:
event id
user_id
string
Example:
user id
cat_id
string
Example:
category id
event_description
string
Example:
event description
event_image
string
Example:
event image
event_country
string
Example:
event country
event_title
string
Example:
event title
event_date
string
Example:
event date
event_state
string
Example:
event state
event_city
string
Example:
event city
event_email
string
Example:
event email
event_phone_number
string
Example:
event phone number
user_profilepic
string
Example:
user profile pic
user_fname
string
Example:
user first name
user_lname
string
Example:
user last name
Get All Events
GET /events/{unique id of the user}

This api is used to get all events.

Path variables

unique id of the user
string optional

Responses

200 OK
Body
Object
event_id
string
Example:
event id
user_id
string
Example:
user id
cat_id
string
Example:
category id
event_description
string
Example:
event description
event_image
string
Example:
event image
event_country
string
Example:
event country
event_title
string
Example:
event title
event_date
string
Example:
event date
event_state
string
Example:
event state
event_city
string
Example:
event city
event_email
string
Example:
event email
event_phone_number
string
Example:
event phone number
user_profilepic
string
Example:
user profile pic
user_fname
string
Example:
user first name
user_lname
string
Example:
user last name
Get Specific Event Details
GET /event/{event id}/user/{unique id of the user}

This api is used to fetch the detail of any event. Developer only need to pass the event id and uid of the user in the url.

Path variables

event id
string optional
unique id of the user
string optional

Responses

200 OK
Body
Object
event_id
string
Example:
event id
user_id
string
Example:
user id
cat_id
string
Example:
category id
event_description
string
Example:
event description
event_image
string
Example:
event image
event_country
string
Example:
event country
event_title
string
Example:
event title
event_date
string
Example:
event date
event_state
string
Example:
event state
event_city
string
Example:
event city
event_email
string
Example:
event email
event_phone_number
string
Example:
event phone number
user_profilepic
string
Example:
user profile pic
user_fname
string
Example:
user first name
user_lname
string
Example:
user last name
Update event data
POST /event/update

This api is used to update event data. There is no field for the image update developer have to use another api for the event image upload.

Request parameters

user_uid
string required

unique id of the user

event_id
string required

Event id

event_description
string required

Event description

event_country
string required

Event country

imageFlag
string required

It will be 1 if user select a image for update and it will be 0 if user don't select any image for update. Also, there is no need to post image variable if user don't select any image for update while the imageFlag variable is 0.

event_image
string optional

base64 image string for the event image update

event_title
string required

event title

event_date
string required

event date

event_state
string required

event state

event_city
string required

event city

event_email
string required

event email

event_phone_number
string required

event phone number

Responses

200 OK
Body
Object
event_id
string
Example:
Event id
user_id
string
Example:
User id
cat_id
string
Example:
category id
event_description
string
Example:
event description
event_image
string
Example:
event image
event_country
string
Example:
event country
user_profilepic
string
Example:
user profile image
user_fname
string
Example:
user first name
user_lname
string
Example:
user last name
Image update
POST /update/image

This api is used to update the event image

Request parameters

user_uid
string required

uid of the user

event_id
string required

event id

event_image
string required

base64 string of the image

Responses

200 OK
Body
Object
status
string
Example:
success
message
string
Example:
Image upload successfully