openapi: 3.1.0
info:
  title: HPE GreenLake for User Management API
  description: >-
    With the HPE GreenLake for Identity Management APIs you can view, update
    preferences, and remove users from your workspace.
  version: 1.0.0
  license:
    name: HPE License
    url: https://www.hpe.com/us/en/software/licensing.html
servers:
  - url: https://global.api.greenlake.hpe.com
security:
  - BearerAuth: []
tags:
  - name: NB-Api-User
    description: User management operations specific to HPE GreenLake.
    x-displayName: User Management
paths:
  /identity/v1/users:
    get:
      tags:
        - NB-Api-User
      summary: Get users
      description: >
        Retrieve list of users with filtering, and pagination options. All users
        are returned when no filters are provided. 

        **Note**: User view all permission is required to invoke this API. 

        Rate limit: 300 requests per minute per workspace, resulting in a `429`
        error if exceeded.
      operationId: get_users_identity_v1_users_get
      parameters:
        - description: >-
            Filter data using a subset of OData 4.0 and return only the subset
            of resources that match the filter.


            Supported classes and examples include:

            - **Types**: timestamp, string

            - **Comparison**: eq, ne, gt, ge, lt

            - **Logical Expressions**: and, or, not


            The Get users API can be filtered by:

            - id

            - username

            - firstName

            - lastName

            - userStatus

            - createdAt

            - updatedAt

            - lastLogin


            userStatus can be one of the following:

            - UNVERIFIED

            - VERIFIED

            - BLOCKED

            - DELETE_IN_PROGRESS

            - DELETED

            - SUSPENDED


            **Note**: The userStatus filter is case-sensitive.
          required: false
          schema:
            title: Filter
            type: string
            description: >-
              Filter data using a subset of OData 4.0 and return only the subset
              of resources that match the filter.


              The Get users API can be filtered by:

              - id

              - username

              - firstName

              - lastName

              - userStatus

              - createdAt

              - updatedAt

              - lastLogin
            default: ''
          examples:
            FilterWithId:
              summary: Filter with id
              description: Returns the user with a specific ID.
              value: id eq '7600415a-8876-5722-9f3c-b0fd11112283'
            FilterWithUsername:
              summary: Filter with username
              description: Returns the user with a specific username.
              value: username eq 'user@example.com'
            FilterWithFirstname:
              summary: Filter with first name
              description: Returns the user with a specific first name.
              value: firstName eq 'First'
            FilterWithLastname:
              summary: Filter with last name
              description: Returns the user with a specific last name.
              value: lastName eq 'Last'
            FilterWithUserStatus:
              summary: Filter with userStatus
              description: Returns users that are not unverified.
              value: userStatus ne 'UNVERIFIED'
            FilterWithCreatedAt:
              summary: Filter with createdAt
              description: Returns users created after 2020-09-21T14:19:09.769747
              value: createdAt gt '2020-09-21T14:19:09.769747'
            FilterWithUpdatedAt:
              summary: Filter with updatedAt
              description: Returns users updated after 2020-09-21T14:19:09.769747
              value: updatedAt gt '2020-09-21T14:19:09.769747'
            FilterWithLastLogin:
              summary: Filter with lastLogin
              description: Returns users that logged in before 2020-09-21T14:19:09.769747
              value: lastLogin lt '2020-09-21T14:19:09.769747'
            FilterWithEmail:
              summary: Filter with email
              description: Returns the user with a specific email.
              value: username eq 'user@example.com'
          name: filter
          in: query
        - description: >-
            Specify pagination offset. An offset argument defines how many pages
            to skip before returning results.
          required: false
          schema:
            title: Pagination offset
            minimum: 0
            type: integer
            description: >-
              Specify pagination offset. An offset argument defines how many
              pages to skip before returning results.
            default: 0
          name: offset
          in: query
        - description: >-
            Specify the maximum number of entries per page. NOTE: The maximum
            value accepted is 600.
          required: false
          schema:
            title: Pagination limit
            maximum: 600
            minimum: 1
            type: integer
            description: >-
              Specify the maximum number of entries per page. NOTE: The maximum
              value accepted is 600.
            default: 300
          name: limit
          in: query
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NBUserPaginate'
              examples:
                NBWorkspaceList:
                  $ref: '#/components/examples/NBUserListExample'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '412':
          description: Precondition Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
      security:
        - BearerAuth: []
    post:
      tags:
        - NB-Api-User
      summary: Invite a user
      description: Invite a user to a workspace.
      operationId: invite_user_to_account_identity_v1_users_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_invite_user_to_account_identity_v1_users_post
      responses:
        '201':
          description: Successful Response
          headers:
            Location:
              description: Endpoint to get the invited user resource
              schema:
                title: Location
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '451':
          description: Unavailable For Legal Reasons
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
      security:
        - BearerAuth: []
        - BearerAuth: []
  /identity/v1/users/{id}:
    get:
      tags:
        - NB-Api-User
      summary: Get a user
      description: Retrieve a single user based on a given user ID.
      operationId: get_user_detailed_identity_v1_users__id__get
      parameters:
        - description: The unique identifier of the user.
          required: true
          schema:
            title: User ID
            type: string
            description: The unique identifier of the user.
            format: uuid
          example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
          name: id
          in: path
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NBUser'
              examples:
                NBUser:
                  $ref: '#/components/examples/NBUserExample'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '412':
          description: Precondition Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
      security:
        - BearerAuth: []
    put:
      tags:
        - NB-Api-User
      summary: Update a user
      description: Update an existing user's preferences.
      operationId: update_user_preferences_identity_v1_users__id__put
      parameters:
        - description: The unique identifier of the user to be updated.
          required: true
          schema:
            title: User ID
            type: string
            description: The unique identifier of the user to be updated.
            format: uuid
          example: 7600415a-8876-5722-9f3c-b0fd11112283
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              title: User preferences
              allOf:
                - $ref: '#/components/schemas/NBUserPreferences'
              description: User preferences to update
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '412':
          description: Precondition Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
      security:
        - BearerAuth: []
    delete:
      tags:
        - NB-Api-User
      summary: Disassociate a user
      description: Delete a user from a workspace.
      operationId: disassociate_platform_user_identity_v1_users__id__delete
      parameters:
        - description: The unique identifier of the user to be deleted.
          required: true
          schema:
            title: User ID
            type: string
            description: The unique identifier of the user to be deleted.
            format: uuid
          example: 7600415a-8876-5722-9f3c-b0fd11112283
          name: id
          in: path
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '412':
          description: Precondition Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    Body_invite_user_to_account_identity_v1_users_post:
      title: Body_invite_user_to_account_identity_v1_users_post
      type: object
      properties:
        email:
          title: Email
          type: string
          description: Email address of the invited user.
        sendWelcomeEmail:
          title: Send welcome e-mail.
          type: boolean
          description: If enabled, a welcome email is sent to the invited user.
          default: true
    Message:
      title: Message
      required:
        - message
      type: object
      properties:
        message:
          title: Message
          type: string
          description: Message
    NBUser:
      title: NBUser
      required:
        - id
        - type
        - username
      type: object
      properties:
        id:
          title: Resource unique ID
          type: string
          description: Resource unique identification
          format: uuid
        type:
          title: Type of data
          type: string
          description: Type of data
        generation:
          title: Generation
          type: integer
          description: Resource history of updates
          default: 0
        createdAt:
          title: Resource created time
          type: string
          description: The time the resource was created.
          format: date-time
        updatedAt:
          title: Resource update time
          type: string
          description: The time the resource was last updated.
          format: date-time
        username:
          title: Email Address
          type: string
          description: User's Email Address
          format: email
        firstName:
          title: First Name
          type: string
          description: User's first name
        lastName:
          title: Last Name
          type: string
          description: User's last name
        userStatus:
          title: User Status
          allOf:
            - $ref: '#/components/schemas/UserStatus'
          description: On-Boarding Status of a user
        lastLogin:
          title: User Last Login time
          type: string
          description: Time when this user had last logged in.
          format: date-time
        resourceUri:
          title: Resource Uri
          type: string
          description: Full path of the resource
      description: User's information for north bound apis.
    NBUserPaginate:
      title: NBUserPaginate
      required:
        - offset
        - count
        - total
        - items
      type: object
      properties:
        offset:
          title: Offset
          type: integer
          description: Specifies the offset of the returned page
        count:
          title: Count
          type: integer
          description: The number of returned items
        total:
          title: Total
          type: integer
          description: The total number of items in the result set
        items:
          title: List of Users
          type: array
          items:
            $ref: '#/components/schemas/NBUser'
          description: List of users
    NBUserPreferences:
      title: NBUserPreferences
      type: object
      properties:
        language:
          title: Language
          allOf:
            - $ref: '#/components/schemas/UserLanguages'
          description: The preferred language of the user.
          default: en
        idleTimeout:
          title: Idle timeout
          type: integer
          description: The user's session idle timeout in seconds.
          default: 1800
    StandardErrorResponse:
      title: StandardErrorResponse
      required:
        - debugId
        - httpStatusCode
        - errorCode
        - message
      type: object
      properties:
        debugId:
          title: Debugid
          type: string
          description: >-
            A unique identifier for this error used to help with
            troubleshooting.
        httpStatusCode:
          title: Httpstatuscode
          type: integer
          description: HTTP status code
        errorCode:
          title: Errorcode
          type: string
          description: HPE GreenLake standard error code
        message:
          title: Message
          type: string
          description: A user-friendly error message.
      description: Standard GreenLake error response model
    UserLanguages:
      title: UserLanguages
      enum:
        - en
        - de
        - es
        - fr
        - jp
        - br
        - cn
        - ko
        - ru
        - it
      description: An enumeration.
    UserStatus:
      title: UserStatus
      enum:
        - UNVERIFIED
        - VERIFIED
        - BLOCKED
        - DELETE_IN_PROGRESS
        - DELETED
        - SUSPENDED
      description: An enumeration.
  examples:
    NBUserExample:
      value:
        id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        type: user
        generation: 1
        createdAt: '2025-09-10T18:22:24.530Z'
        updatedAt: '2025-09-11T10:20:19.530Z'
        username: user@example.com
        firstName: First
        lastName: Last
        userStatus: UNVERIFIED
        lastLogin: '2025-09-10T18:22:24.530Z'
        resourceUri: /identity/v1/users/3fa85f64-5717-4562-b3fc-2c963f66afa6
    NBUserListExample:
      value:
        offset: 0
        count: 1
        total: 1
        items:
          - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
            type: user
            generation: 1
            createdAt: '2025-09-10T18:22:24.530Z'
            updatedAt: '2025-09-11T10:20:19.530Z'
            username: user@example.com
            firstName: First
            lastName: Last
            userStatus: UNVERIFIED
            lastLogin: '2025-09-10T18:22:24.530Z'
            resourceUri: /identity/v1/users/3fa85f64-5717-4562-b3fc-2c963f66afa6
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
