# user login (user+pw)

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /be/v1/login:
    post:
      summary: user login (user+pw)
      deprecated: false
      description: >-
        This endpoint allows a user to perform initial login and obtain a list
        of organizations linked to username along with organization selection
        token. The organization selection token is valid for 15min. It is used
        to login into particular organization from the list of linked
        organizations.
      tags:
        - ROCKIT Edge - Backend API/Authentication
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                pw:
                  type: string
                  description: Password of the user.
                username:
                  type: string
                  description: Unique and immutable username.
              required:
                - pw
                - username
              x-apidog-orders:
                - pw
                - username
              x-apidog-ignore-properties: []
            example:
              pw: '{{EDGE_ORG_ADMIN_PW}}'
              username: '{{EDGE_ORG_ADMIN_USERNAME}}'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      Indicates that the login operation succeeded. A value of
                      "success" confirms that the provided credentials are
                      valid.
                  login:
                    type: object
                    properties:
                      token:
                        type: string
                        description: >-
                          The organization selection token issued to the user
                          for subsequent login into particular organization.
                      expires:
                        type: integer
                        description: >-
                          A UNIX timestamp (integer) indicating when the
                          organization selection token expires.
                    required:
                      - token
                      - expires
                    x-apidog-orders:
                      - token
                      - expires
                    description: >-
                      Contains organization selection token and its expiration
                      time as UNIX timestamp (integer):
                    x-apidog-ignore-properties: []
                  orgs:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: Organization name.
                        label:
                          type: string
                          description: Organization label.
                      x-apidog-orders:
                        - name
                        - label
                      description: >-
                        Object containing name and label of organization linked
                        to username.
                      required:
                        - name
                        - label
                      x-apidog-ignore-properties: []
                    description: 'Provides list of organizations linked to the username:'
                  username:
                    type: string
                    description: Contains username used to login.
                required:
                  - status
                  - login
                  - orgs
                  - username
                x-apidog-orders:
                  - status
                  - login
                  - orgs
                  - username
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: OK
        '400':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      Reflects that the creation failed due to one or more
                      invalid or missing parameters in the request.
                  error:
                    type: string
                    description: Contains an error identifier.  (e.g., "invalid-param")
                  message:
                    type: string
                    description: >-
                      Explains the nature of the invalid input (for example,
                      "name invalid").
                  detail:
                    type: string
                    description: >-
                      Offers further context on the error. (e.g., expected
                      pattern for the organization name)
                x-apidog-orders:
                  - 01JQMCHN2K2KNHBNTNPCDGJCB1
                required:
                  - status
                  - error
                  - message
                  - detail
                x-apidog-refs:
                  01JQMCHN2K2KNHBNTNPCDGJCB1:
                    $ref: '#/components/schemas/Invalid%20Param'
                x-apidog-ignore-properties:
                  - status
                  - error
                  - message
                  - detail
          headers: {}
          x-apidog-name: Invalid Param
        '401':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      Indicates that the organization creation request was
                      rejected because of authentication problems.
                  error:
                    type: string
                    description: Contains an error identifier. (e.g."unauthorized")
                  message:
                    type: string
                    description: >-
                      Provides details such as "invalid token" to help diagnose
                      the failure.
                x-apidog-orders:
                  - 01JQMCAVDVRFQA8N5ZQHN6Y570
                x-apidog-refs:
                  01JQMCAVDVRFQA8N5ZQHN6Y570:
                    $ref: '#/components/schemas/unauthorized'
                required:
                  - status
                  - error
                  - message
                x-apidog-ignore-properties:
                  - status
                  - error
                  - message
          headers: {}
          x-apidog-name: Unauthorized
      security: []
      x-apidog-folder: ROCKIT Edge - Backend API/Authentication
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/732774/apis/api-21568300-run
components:
  schemas:
    Invalid Param:
      type: object
      properties:
        status:
          type: string
          description: >-
            Reflects that the creation failed due to one or more invalid or
            missing parameters in the request.
        error:
          type: string
          description: Contains an error identifier.  (e.g., "invalid-param")
        message:
          type: string
          description: >-
            Explains the nature of the invalid input (for example, "name
            invalid").
        detail:
          type: string
          description: >-
            Offers further context on the error. (e.g., expected pattern for the
            organization name)
      required:
        - status
        - error
        - message
        - detail
      x-apidog-orders:
        - status
        - error
        - message
        - detail
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    unauthorized:
      type: object
      properties:
        status:
          type: string
          description: >-
            Indicates that the organization creation request was rejected
            because of authentication problems.
        error:
          type: string
          description: Contains an error identifier. (e.g."unauthorized")
        message:
          type: string
          description: >-
            Provides details such as "invalid token" to help diagnose the
            failure.
      required:
        - status
        - error
        - message
      x-apidog-orders:
        - status
        - error
        - message
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    Bearer token:
      type: bearer
      scheme: bearer
      description: >-
        Enter your Access Token. You can obtain this by calling the /be/v1/login
        endpoint. Use the Refresh token to get a new Access token when it
        expires.
servers:
  - url: https://Example-Server.com
    description: Default
security: []

```
