Retrieve holidays entry.
GET
/show
Path parameters
-
access_tokenstring
required
token to be passed as a header -
idinteger
required
The unique id of the holidays entry.
Sample Request
curl -v -X GET http://127.0.0.1:8990/api/holidays/show \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
Responses
200
Successful operation
application/json
-
typestring
type of the holiday entry. -
time_fromstring
holiday start time. Date-time string in ISO 8601 format (e.g. 2017-01-01 00:00:00) -
per_yearboolean
Is holiday per year. -
time_tostring
holiday end time. Date-time string in ISO 8601 format (e.g. 2017-01-01 00:00:00) -
namestring
name of the holiday entry. -
idinteger
The unique id of the holiday entry.
Sample Response
{
"name": "aaa",
"id": 123
}
Destroy an holidays entry.
POST
/destroy
Destroy a certain holidays entry.
Path parameters
-
access_tokenstring
required
token to be passed as a header
Request body
application/json
-
idinteger
required
The unique id of the holiday entry.
Sample Request
curl -v -X POST http://127.0.0.1:8990/api/holidays/destroy \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
-d '{
"id": 123
}'
Responses
200
Successful operation
400
Invalid rule ID supplied.
Sample Response
Update holidays entry
POST
/update
Update holidays that already exists.
Path parameters
-
access_tokenstring
required
token to be passed as a header
Request body
application/json
-
typestring
required
type of the holiday entry. -
time_fromstring
required
holiday start time. Date-time string in ISO 8601 format (e.g. 2017-01-01 00:00:00) -
per_yearboolean
required
Is holiday per year. -
time_tostring
required
holiday end time. Date-time string in ISO 8601 format (e.g. 2017-01-01 00:00:00) -
namestring
required
name of the holiday entry. -
idinteger
required
The unique id of the holiday entry.
Sample Request
curl -v -X POST http://127.0.0.1:8990/api/holidays/update \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
-d '{
"name": "aaa",
"id": 123
}'
Responses
200
Successful operation
Sample Response
Add a new holidays entry
POST
/create
Path parameters
-
access_tokenstring
required
token to be passed as a header
Request body
application/json
-
per_yearboolean
required
Is holiday per year. -
time_fromstring
required
holiday start time. Date-time string in ISO 8601 format (e.g. 2017-01-01 00:00:00) -
time_tostring
required
holiday end time. Date-time string in ISO 8601 format (e.g. 2017-01-01 00:00:00) -
namestring
required
name of the holiday entry. -
typestring
required
type of the holiday entry.
Sample Request
curl -v -X POST http://127.0.0.1:8990/api/holidays/create \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
-d '{
"name": "aaa"
}'
Responses
200
Created holidays entry
Sample Response
Retrieve a collection of holidays entries.
GET
/list
Retrieve a collection of holidays entries.
Path parameters
-
access_tokenstring
required
token to be passed as a header -
paginationinteger
required
The pagination of paging. -
pagesizeinteger
required
The size of paging. -
sort_bystring
optional
Default value will be used when user does not specify value for this field.
Sample Request
curl -v -X GET http://127.0.0.1:8990/api/holidays/list \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
Responses
200
Successful operation
application/json
-
pagesizeinteger
-
countinteger
-
paginationinteger
-
ip_filtersarray
Show child attributes -
sort_bystring
Sample Response
{
"pagesize": 10,
"count": 100,
"pagination": 8,
"sort_by": "DEFAULT"
}