Retrieve a collection of holidays entries.

GET /list
Retrieve a collection of holidays entries.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • pagination

    integer

    required

    The pagination of paging.
  • pagesize

    integer

    required

    The size of paging.
  • sort_by

    string

    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
  • pagination

    integer

  • count

    integer

  • ip_filters

    array

    Show child attributes
  • sort_by

    string

  • pagesize

    integer

Sample Response

                      
{
    "pagination": 8,
    "count": 100,
    "sort_by": "DEFAULT",
    "pagesize": 10
}
                      
                    

Update holidays entry

POST /update
Update holidays that already exists.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • id

    integer

    required

    The unique id of the holiday entry.
  • type

    string

    required

    type of the holiday entry.
  • per_year

    boolean

    required

    Is holiday per year.
  • time_to

    string

    required

    holiday end time. Date-time string in ISO 8601 format (e.g. 2017-01-01 00:00:00)
  • name

    string

    required

    name of the holiday entry.
  • time_from

    string

    required

    holiday start time. Date-time string in ISO 8601 format (e.g. 2017-01-01 00:00:00)

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 '{
    "id": 123,
    "name": "aaa"
}'
                      
                    

Responses

200
Successful operation

Sample Response

                      
                      
                    

Destroy an holidays entry.

POST /destroy
Destroy a certain holidays entry.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • id

    integer

    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

400
Invalid rule ID supplied.
200
Successful operation

Sample Response

                      
                      
                    

Retrieve holidays entry.

GET /show
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • id

    integer

    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
  • id

    integer

    The unique id of the holiday entry.
  • type

    string

    type of the holiday entry.
  • per_year

    boolean

    Is holiday per year.
  • time_to

    string

    holiday end time. Date-time string in ISO 8601 format (e.g. 2017-01-01 00:00:00)
  • name

    string

    name of the holiday entry.
  • time_from

    string

    holiday start time. Date-time string in ISO 8601 format (e.g. 2017-01-01 00:00:00)

Sample Response

                      
{
    "id": 123,
    "name": "aaa"
}
                      
                    

Add a new holidays entry

POST /create
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • type

    string

    required

    type of the holiday entry.
  • time_to

    string

    required

    holiday end time. Date-time string in ISO 8601 format (e.g. 2017-01-01 00:00:00)
  • per_year

    boolean

    required

    Is holiday per year.
  • name

    string

    required

    name of the holiday entry.
  • time_from

    string

    required

    holiday start time. Date-time string in ISO 8601 format (e.g. 2017-01-01 00:00:00)

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