SSO
  1. assistant
SSO
  • sso
    • admin
      • account-create
      • account-suspend
      • account-unsuspend
      • account-bind-wallet
    • applications
      • scope
        • add
        • delete
      • user
        • add
        • update
        • delete
        • user-all
        • is-allowed
      • create
      • delete
      • new-api-key
      • all
      • all-own
      • details
      • is-owner
    • auth
      • token
        • token-refresh
      • register
        • register
        • request-email-code
        • verify-email-code
      • password
        • password-reset
        • request-email-code
        • verify-email-code
      • discord
        • authorize-URL
        • login
      • login
      • auth-me
      • logout
    • auth-eth
      • login-challenge
      • login
      • bind-challenge
      • bind-account
      • is-bound
    • access
      • planning
        • session
          • get
          • all
          • find
          • create
          • update
          • delete
        • assistant
          • create-sessions
            POST
          • delete-sessions
            DELETE
        • get
          GET
      • pbe-access
        • is-authorized
    • newsletter
      • get-subscribers
    • user
      • me
        • email
          • update
        • password
          • update
      • role
        • all
        • update-role
        • update-role-batch
        • delete-role
        • delete-role-batch
      • all
      • find
    • wallet
      • find-owner
      • find-wallet
    • Get API version
      GET
  1. assistant

create-sessions

POST
/access/planning/assistant/create-sessions
Create 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

请求参数

Header 参数

Body 参数application/json

示例
{
    "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
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://sso.gameown.io/api/access/planning/assistant/create-sessions' \
--header 'Content-Type: application/json' \
--data-raw '{
    "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
}'

返回响应

🟢200Success
application/json
Body

示例
{
    "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"
        }
    ]
}
修改于 2023-03-16 14:04:34
上一页
delete
下一页
delete-sessions
Built with