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.

    format : int64

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

    string

    type of the holiday entry.

    enum : ['SINGLE_DAY', 'RANGE_OF_DAYS']

  • time_from

    string

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

    format : date-time

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

    format : date-time

  • name

    string

    name of the holiday entry.
  • id

    integer

    The unique id of the holiday entry.

    format : int64

Sample Response

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

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.

    format : int64

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_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.

    enum : ['SINGLE_DAY', 'RANGE_OF_DAYS']

  • time_from

    string

    required

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

    format : date-time

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

    format : date-time

  • name

    string

    required

    name of the holiday entry.
  • id

    integer

    required

    The unique id of the holiday entry.

    format : int64

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_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • per_year

    boolean

    required

    Is holiday per year.
  • time_from

    string

    required

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

    format : date-time

  • time_to

    string

    required

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

    format : date-time

  • name

    string

    required

    name of the holiday entry.
  • type

    string

    required

    type of the holiday entry.

    enum : ['SINGLE_DAY', 'RANGE_OF_DAYS']

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_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.

    enum : ['DEFAULT', 'OPTIONAL']

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

    integer

  • count

    integer

  • pagination

    integer

  • ip_filters

    array

    Show child attributes
  • sort_by

    string

Sample Response

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