scheduledtimes

List scheduledtimes

Retrieves the scheduled time intervals for a selected resource

Request

HTTP GET /scheduledtimes

 

Parameters

Name

Required

Value

Description

Default values
resourceyesresource=12Selected resource 

startdate

Yes

startdate=2014-01-01

Start date for interval

 

enddate

No

enddate=2014-01-02

End date for interval

startdate + 1 day
businessunitNobusinessunit=14Select open schedules for a certain businessunit. Regular schedules are always global. Spells (arbetspass) may be locked to specific businessunits and may be filtered out by this parameter.-

Example:

APIURL/scheduledtimes.xml?resource=12&startdate=2014-01-01&enddate=2014-01-02

Response

Tag

Format

Example

Description

scheduledtimes

 

<scheduledtimes>

 

startdate

Date

<start>2014-01-01</start>

Start date for search interval

enddate

Date

<end>2014-01-02</end>

End date search interval

resource

 

<resource><id>12</id><name>Reception</name></resource>

The selected resource

blocks <blocks> 
block <block>A scheduled block. A block consists of a start and endtime. When spells are used one day can contain many blocks. If a regular schedule is used a day can only contain one block. If the schedule is open 24 hours per day, the response will contain one block for the entire search interval.
startTidpunkt<start><timepoint><timestamp>1332442800</timestamp><datetime>2012-03-22 20:00</datetime><date>2012-03-22</date><time>20:00</time></timepoint></start>Start time
endTidpunkt<end><timepoint><timestamp>1332442800</timestamp><datetime>2012-03-22 21:00</datetime><date>2012-03-22</date><time>21:00</time></timepoint></end>End time
<scheduledtimes>
	<resource>
		<id>12</id>
		<name>Reception</name>
	</resource>
	<startdate>2015-02-09</enddate>
	<enddate>2015-02-09</enddate>
	<blocks>
   		<block>
			<start>
                <timepoint>
                    <timestamp>1423465200</timestamp>
                    <datetime>2015-02-09 08:00</datetime>
                    <date>2015-02-09</date>
                    <time>08:00</time>
                </timepoint>
            </start>
            <end>
                <timepoint>
                    <timestamp>1423468800</timestamp>
                    <datetime>2015-02-09 09:00</datetime>
                    <date>2015-02-09</date>
                    <time>09:00</time>
                </timepoint>
            </end>
		</block>
	   	<block>
			<start>
                <timepoint>
                    <timestamp>1423472400</timestamp>
                    <datetime>2015-02-09 10:00</datetime>
                    <date>2015-02-09</date>
                    <time>10:00</time>
                </timepoint>
            </start>
            <end>
                <timepoint>
                    <timestamp>1423476000</timestamp>
                    <datetime>2015-02-09 11:00</datetime>
                    <date>2015-02-09</date>
                    <time>11:00</time>
                </timepoint>
            </end>
		</block>
	</blocks>
</scheduledtimes>