Holidays

List holidays

Retrieve a collection of holiday entries.

get

/holidays

Authorizations
Query parameters
filterstring

Use the filter query parameter to retrieve just a subset of a collection.

searchstring

Use the search query parameter to restrict the results of a request to match a search criterion.

orderbystring

Use the orderby query parameter to specify the sort order of the items returned from server.
The default order is ascending order.

skipinteger · int32 · default: 0

Use the skip query parameter to set the number of items to skip at the start of a collection.

topinteger · int32 · min: 1 · max: 100 · default: 100

Use the top query parameter to specify the page size of the result set.

Responses
curl -L \
  --url 'https://HOSTNAME:8887/api/holidays' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "count": 100,
  "items": [
    {
      "name": "text",
      "region": "text",
      "consecutive": true,
      "every_year": true,
      "year_start": 1,
      "year_end": 1,
      "month_start": 1,
      "month_end": 1,
      "day_start": 1,
      "day_end": 1,
      "hour_start": 1,
      "hour_end": 1,
      "minute_start": 1,
      "minute_end": 1,
      "id": "NzAwNTUxOTA5NzczMTQ4MTYw"
    }
  ]
}

Create a new holiday

Create a new holiday

post

/holidays

Authorizations
Body
namestring · min: 1 · max: 64required

The name of the holiday.

regionstringrequired

A valid country code based on iso3166-1 alpha-3 standard. see: https://www.iso.org/iso-3166-country-codes.html

consecutivebooleanrequired

Whether the holiday consists of consecutive days.

every_yearbooleanrequired

Does the holiday take effect every year.

year_startinteger

The start year of holiday.

year_endinteger

The start year of holiday.

month_startinteger

The start month of holiday.

month_endinteger

The end month of holiday.

day_startinteger

The start day of holiday.

day_endinteger

The end day of holiday.

hour_startinteger

The start hour of holiday.

hour_endinteger

The end hour of holiday.

minute_startinteger

The start minute of holiday.

minute_endinteger

The end minute of holiday.

Responses
curl -L \
  --request POST \
  --url 'https://HOSTNAME:8887/api/holidays' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "text",
    "region": "text",
    "consecutive": true,
    "every_year": true,
    "year_start": 1,
    "year_end": 1,
    "month_start": 1,
    "month_end": 1,
    "day_start": 1,
    "day_end": 1,
    "hour_start": 1,
    "hour_end": 1,
    "minute_start": 1,
    "minute_end": 1
  }'
{
  "id": "NzAwNTUxOTA5NzczMTQ4MTYw"
}

Retrieve a holiday

get

/holidays/{id}

Authorizations
Path parameters
idall ofrequired

The unique ID of holiday.

The unique ID of the resource.

Responses
curl -L \
  --url 'https://HOSTNAME:8887/api/holidays/{id}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "name": "text",
  "region": "text",
  "consecutive": true,
  "every_year": true,
  "year_start": 1,
  "year_end": 1,
  "month_start": 1,
  "month_end": 1,
  "day_start": 1,
  "day_end": 1,
  "hour_start": 1,
  "hour_end": 1,
  "minute_start": 1,
  "minute_end": 1,
  "id": "NzAwNTUxOTA5NzczMTQ4MTYw"
}

Update a holiday

Update a holiday that already exists.

post

/holidays/{id}

Authorizations
Path parameters
idall ofrequired

The unique ID of holiday.

The unique ID of the resource.

Body
namestring · min: 1 · max: 64

The name of the holiday.

regionstring

A valid country code based on iso3166-1 alpha-3 standard. see: https://www.iso.org/iso-3166-country-codes.html

consecutiveboolean

Whether the holiday consists of consecutive days.

every_yearboolean

Does the holiday take effect every year.

year_startinteger

The start year of holiday.

year_endinteger

The start year of holiday.

month_startinteger

The start month of holiday.

month_endinteger

The end month of holiday.

day_startinteger

The start day of holiday.

day_endinteger

The end day of holiday.

hour_startinteger

The start hour of holiday.

hour_endinteger

The end hour of holiday.

minute_startinteger

The start minute of holiday.

minute_endinteger

The end minute of holiday.

Responses
curl -L \
  --request POST \
  --url 'https://HOSTNAME:8887/api/holidays/{id}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "text",
    "region": "text",
    "consecutive": true,
    "every_year": true,
    "year_start": 1,
    "year_end": 1,
    "month_start": 1,
    "month_end": 1,
    "day_start": 1,
    "day_end": 1,
    "hour_start": 1,
    "hour_end": 1,
    "minute_start": 1,
    "minute_end": 1
  }'

No body

Was this helpful?