Getting the details of a day type
By providing a specific date, the API provides all the information about the corresponding day type, including the associated day validity items.
Authentication phase
Before using the endpoint, you must run the authentication phase (→ Login).
After the authentication, a session opens and a valid session token persists until:
- The end of the session time-out, that is set through the parameter sessionTimeout (→ OptimaWSI configuration > OptimaAuth node).
- An explicit Logout call (→ Logout).
Request
GET https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optima-wsi/calendar/getDayType?day=<YYYYMMDD>
Request resource
Not applicable.
Request parameters
| Parameter | Required | Description |
|---|---|---|
|
day |
YES |
String parameter to filter the day type. The string must be formatted according to the pattern YYYYMMDD. |
Request content-type
Not applicable.
Request body (payload)
Not applicable.
Response status
| HTTP status | Description |
|---|---|
|
200 OK |
Result of the processed request. |
|
400 Bad request |
If IllegalArgumentException occurs. |
|
500 Internal server error |
Endpoint instance is not found. |
Response content-type
JSON
Response output
JSON object that contains the details about the day type.
{
"idno": <integer>,
"name": <string>,
"wght": <real>,
"listDval": [{
"idno": <integer>,
"name": <string>,
"excl": <integer>,
"wght": <real>,
"listDvel": [{
"iele": <integer>,
"dval": <dvel.dval>,
"wemo": <array of booleans>,
"dawe": <array of booleans>,
"damo": <array of booleans>,
"weye": <array of booleans>,
"moye": <array of booleans>,
"itim": <integer>,
"etim": <integer>
},
...
]
},
...
],
"mauallyAssociated": <boolean>,
"equilibriumComputed": <boolean>,
"referenceDtyp": <dtyp.reference_equilibrium_dtyp>
}
|
JSON field |
Description |
||
|---|---|---|---|
|
idno |
Integer value. Contains the day type identifier. |
||
|
name |
String value. Contains the day type name. |
||
|
wght |
Real value. Contains the weight value (>0) associated with the day type. It represents a weight used for result aggregation related to an analysis horizon, such as for one a year. If more than one day validity (listDval array) is associated to the day type, all validities listDval/wght related to a specific date are considered and their sum is divided by the total sum of all day validities specified. |
||
|
listDval |
An array containing the list of day validities to which the day type is associated. |
||
|
Integer value. Contains the day validity identifier. |
||
|
String value. Contains the day validity identifier. |
||
|
Integer value. You can set day validity elements in a complementary way (all days excluded except the ones defined by the day validity elements in listDvel).
|
||
|
Real value. Contains the weight value (>0) associated to the day validity. |
||
|
An array containing all elements that made-up the day validity. |
||
|
Integer value. Contains the day validity element index. |
||
|
Identifier of the referenced street |
||
|
Array of 4 boolean values, representing the weeks of the month, starting from Sunday.
Identifier of the referenced street |
||
|
Array of 7 boolean values, representing the days of the week, starting from Sunday.
|
||
|
Array of 31 boolean values, representing the days of the month.
|
||
|
Array of 53 boolean values, representing the weeks of the year.
|
||
|
Array of 12 boolean values, representing the months of the year.
|
||
|
Integer value. Contains the number of seconds for setting the starting time, according to the pattern HHMMSS. Default value=0. |
||
|
Integer value. Contains the number of seconds for setting the ending time, according to the pattern HHMMSS. Default value=86400. |
||
|
mauallyAssociated |
Boolean value.
|
||
|
equilibriumComputed |
Boolean value.
|
||
|
referenceDtyp |
Contains the identifier of another day type to be used to use the equilibrium demand and turn probabilities. |
Request
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optima-wsi/calendar/getDayType?day=<YYYYMMDD>
Response status
| HTTP status | Description |
|---|---|
|
200 OK |
Result of the processed request. |
Response output
{
"idno": 2,
"name": "DTYP1",
"wght": 1.0,
"listDval": [{
"idno": 1,
"name": "DVAL1",
"excl": 0,
"wght": 1.0,
"listDvel": [{
"iele": 0,
"weye": [true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],
"itim": 0,
"moye": [true,true,true,true,true,true,true,true,true,true,true,true],
"etim": 86400,
"dawe": [false,true,true,true,true,true,false],
"damo": [true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],
"wemo": [true,true,true,true,true],
"dval": 1
}]
},
{
"idno": 2,
"name": "DVAL2",
"excl": 0,
"wght": 1.0,
"listDvel": [{
"iele": 1,
"weye": [true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],
"itim": 23400,
"moye": [true,true,true,true,true,true,true,true,true,true,true,true],
"etim": 43200,
"dawe": [false,false,true,false,false,false,false],
"damo": [true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],
"wemo": [true,true,true,true,true],
"dval": 2
},
{
"iele": 2,
"weye": [true,true, true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],
"itim": 54000,
"moye": [true,true,true,true,true,true,true,true,true,true,true,true],
"etim": 70200,
"dawe": [false,false,false,false,false,true,false],
"damo": [true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],
"wemo": [true,true,true,true,true],
"dval": 2
}]
}],
"manuallyAssociated": false,
"equilibriumComputed": false,
"referenceDtyp": null
}
Request
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optima-wsi/calendar/getDayType
Response status
| HTTP status | Description |
|---|---|
|
400 Bad request |
Missing day parameter. |
Response output
{"code": 400,"message": "Missing query parameter."}
Request
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optima-wsi/calendar/getDayType?day=201904XL
Response status
| HTTP status | Description |
|---|---|
|
400 Bad request |
Wrong format of the day parameter. |
Response output
{"code": 400,"message": "Not valid query parameter. Expected format is: YYYYMMDD."}