GET /rest/tis/report/1.0/data/calendars

A list of calendars defined in the system with their IDs can be requested through the following REST endpoint.

Request

<jira_url>/rest/tis/report/1.0/data/calendars

Parameters

This request requires no parameters.

Examples

https://192.168.0.1/rest/tis/report/1.0/data/calendars


Responses

Success

HTTP 200

Returns a JSON that contains all calendars defined in your instance, including the predefined 7/24 (normalHours) Calendar and Default Calendar Settings.

{
    "calendars": [
        {
            "id": "normalHours",
            "name": "7/24",
            "monday": true,
            "tuesday": true,
            "wednesday": true,
            "thursday": true,
            "friday": true,
            "saturday": true,
            "sunday": true,
            "workHours": "00:00 - 00:00",
			"holidayList": [],
            "holidays": [],
            "timeZone": "Asia/Istanbul"
        },
        {
            "id": "0",
            "name": "Default Calendar Settings",
            "monday": true,
            "tuesday": true,
            "wednesday": true,
            "thursday": true,
            "friday": true,
            "saturday": false,
            "sunday": false,
            "workHours": "08:00 - 17:00",
			"holidayList": [],
            "holidays": [],
            "timeZone": "Asia/Istanbul"
        },      
	    {
	        "id": 2,
    	    "name": "Team A calendar",
        	"monday": true,
	        "tuesday": true,
	        "wednesday": true,
	        "thursday": true,
	        "friday": true,
	        "saturday": false,
	        "sunday": false,
	        "timeZone": "(UTC+03:00) Europe/Istanbul",
	        "startTime": "00:02",
	        "endTime": "17:00",
			"holidayList": [
			    {
		    	    "date": "01/12/2019",
		            "applyEachYear": false,
		            "description": "Sample holiday"
	            }
	        ],
	        "holidays": {
	            "01/12/2019": "Sample holiday"
	        }
    	}
    ]
}

The holidayList element in the JSON result returns data in a better structure. API consumers are strongly recommended to use this holiday array.

The holidays element is included just for backward compatibility and may be removed in future releases.

  • No labels