# 用户初始化

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /:
    get:
      summary: 用户初始化
      deprecated: false
      description: 用户访问该接口 用于用户统计与用户日志上报记录
      tags:
        - 日志系统
      parameters:
        - name: deviceID
          in: header
          description: 用户设备ID
          required: true
          example: NAHIDANAHIDANAHIDANAHIDANAHIDA27
          schema:
            type: string
        - name: User-Agent
          in: header
          description: ''
          example: MSL API Test
          schema:
            type: string
            default: MSL API Test
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      apiInfo:
                        type: object
                        properties:
                          lastTime:
                            type: string
                          nextTime:
                            type: string
                          times:
                            type: integer
                          cron:
                            type: string
                          syncWorking:
                            type: boolean
                        required:
                          - lastTime
                          - nextTime
                          - times
                          - cron
                          - syncWorking
                        x-apifox-orders:
                          - lastTime
                          - nextTime
                          - times
                          - cron
                          - syncWorking
                      userInfo:
                        type: object
                        properties:
                          deviceID:
                            type: string
                          uid:
                            type: integer
                        required:
                          - deviceID
                          - uid
                        x-apifox-orders:
                          - deviceID
                          - uid
                    required:
                      - apiInfo
                      - userInfo
                    x-apifox-orders:
                      - apiInfo
                      - userInfo
                required:
                  - code
                  - message
                  - data
                x-apifox-orders:
                  - code
                  - message
                  - data
              example:
                code: 200
                message: 新用户注册
                data:
                  apiInfo:
                    lastTime: undefined
                    nextTime: '2024-07-09T00:00:00+08:00'
                    times: 0
                    cron: 0 */6 * * *
                    syncWorking: false
                  userInfo:
                    deviceID: NAHIDANAHIDANAHIDANAHIDANAHIDA27
                    uid: 1
                    regTime: 2024/7/8 19:46:53
          headers: {}
          x-apifox-name: 成功
        x-200:非法设备ID/无设备ID:
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      apiInfo:
                        type: object
                        properties:
                          lastTime:
                            type: string
                          nextTime:
                            type: string
                          times:
                            type: integer
                          cron:
                            type: string
                          syncWorking:
                            type: boolean
                        required:
                          - lastTime
                          - nextTime
                          - times
                          - cron
                          - syncWorking
                        x-apifox-orders:
                          - lastTime
                          - nextTime
                          - times
                          - cron
                          - syncWorking
                      userInfo:
                        type: object
                        properties:
                          deviceID:
                            type: string
                        required:
                          - deviceID
                        x-apifox-orders:
                          - deviceID
                    required:
                      - apiInfo
                      - userInfo
                    x-apifox-orders:
                      - apiInfo
                      - userInfo
                required:
                  - code
                  - message
                  - data
                x-apifox-orders:
                  - code
                  - message
                  - data
              example:
                code: 200
                message: 非法的MSL设备ID
                data:
                  apiInfo:
                    lastTime: '2024-07-08T16:49:31+08:00'
                    nextTime: '2024-07-08T18:00:00+08:00'
                    times: 1
                    cron: 0 */6 * * *
                    syncWorking: true
                  userInfo: {}
          headers: {}
          x-apifox-name: 非法设备ID/无设备ID
      security: []
      x-apifox-folder: 日志系统
      x-apifox-status: testing
      x-run-in-apifox: https://app.apifox.com/web/project/7956474/apis/api-429587278-run
components:
  schemas: {}
  securitySchemes: {}
servers: []
security: []

```
