create-sessions
POST
/access/planning/assistant/create-sessionsCreate a list of sessions based on the given configuration.
A session with time [startTime, endTime] will be created for each day specified in the day picker between the date range of [from -> to].
available types : early-access, whitelist
Request
Header Params
Authorization
string
optional
Example:
Bearer {{token}}
x-api-key
string
optional
Body Params application/json
type
string
session type
[early-access, whitelist]
startTime
object
required
generic time within a day
hour
integer
required
minute
integer
required
second
integer
required
endTime
object
required
generic time within a day
hour
integer
required
minute
integer
required
second
integer
required
from
string
UTC date format
YYYY-MM-DDThh:mm:ss.000Z
to
string
UTC date format
YYYY-MM-DDThh:mm:ss.000Z
dayPicker
object
required
specify on which day of the week a session will be created
monday
boolean
required
tuesday
boolean
required
wednesday
boolean
required
thursday
boolean
required
friday
boolean
required
saturday
boolean
required
sunday
boolean
required
ignoreConflicts
boolean
required
if true and there is a conflict with an existing session an error will be returned
Example
{
"type": "early-access",
"startTime": {
"hour": 10,
"minute": 0,
"second": 0
},
"endTime": {
"hour": 18,
"minute": 0,
"second": 0
},
"from": "2022-06-20T00:00:00.000Z",
"to": "2022-06-30T00:00:00.000Z",
"dayPicker": {
"monday": true,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": false,
"sunday": false
},
"ignoreConflicts": false
}
Request samples
Responses
Success(200)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
sessions
array [object {4}]
created sessions
id
integer
session id
type
string
session type
[early-access, whitelist]
start
string
UTC date format
YYYY-MM-DDThh:mm:ss.000Z
end
string
UTC date format
YYYY-MM-DDThh:mm:ss.000Z
Example
{
"sessions": [
{
"id": 11,
"type": "early-access",
"start": "2022-07-04T10:00:00.000Z",
"end": "2022-07-04T18:00:00.000Z"
},
{
"id": 12,
"type": "early-access",
"start": "2022-07-05T10:00:00.000Z",
"end": "2022-07-05T18:00:00.000Z"
}
]
}
Last modified: 2 年前