openapi: 3.0.1 info: title: IO.Common Accounts Users API version: '1.0' security: - OAuth2: [] tags: - name: Users paths: /v1/Users/info: get: tags: - Users summary: Returns user info of a current user (authenticated) operationId: Get UserInfo parameters: - name: Account in: query description: Account schema: title: Account type: int responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/UserInfoResponse' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ProblemDetails' '401': description: Unauthorized '403': description: Forbidden security: - OAuth2: - io.common /v1/Users: get: tags: - Users summary: Returns all users based on the request description: 'Sortable columns: id, username, firstName, lastName, fullName, profileName, email.' operationId: Users list parameters: - name: ShowOnlyNotConfirmed in: query schema: type: boolean - name: Filter in: query schema: type: string - name: Page in: query schema: type: integer format: int32 - name: PageSize in: query schema: type: integer format: int32 - name: SortColumn in: query schema: type: string - name: SortOrder in: query schema: type: string - name: Account in: query description: Account schema: title: Account type: int responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/UserResponsePagedResult' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' '401': description: Unauthorized '403': description: Forbidden security: - OAuth2: - io.common post: tags: - Users summary: Creates a new user operationId: Create user parameters: - name: Account in: query description: Account schema: title: Account type: int requestBody: description: '' content: application/json-patch+json; x-api-version=1.0: schema: $ref: '#/components/schemas/CreateUserRequest' application/json; x-api-version=1.0: schema: $ref: '#/components/schemas/CreateUserRequest' text/json; x-api-version=1.0: schema: $ref: '#/components/schemas/CreateUserRequest' application/*+json; x-api-version=1.0: schema: $ref: '#/components/schemas/CreateUserRequest' responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/Int32ResourceCreatedResponse' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' '422': description: Client Error content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' '401': description: Unauthorized '403': description: Forbidden security: - OAuth2: - io.common /v1/Users/{userId}: get: tags: - Users summary: Retruns user details by id operationId: Get user details by userid parameters: - name: userId in: path description: '' required: true schema: type: integer format: int32 - name: Account in: query description: Account schema: title: Account type: int responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/UserDetailsResponse' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' '401': description: Unauthorized '403': description: Forbidden security: - OAuth2: - io.common put: tags: - Users summary: Update user details operationId: Update user parameters: - name: userId in: path description: '' required: true schema: type: integer format: int32 - name: Account in: query description: Account schema: title: Account type: int requestBody: description: '' content: application/json-patch+json; x-api-version=1.0: schema: $ref: '#/components/schemas/UpdateUserDetailsRequest' application/json; x-api-version=1.0: schema: $ref: '#/components/schemas/UpdateUserDetailsRequest' text/json; x-api-version=1.0: schema: $ref: '#/components/schemas/UpdateUserDetailsRequest' application/*+json; x-api-version=1.0: schema: $ref: '#/components/schemas/UpdateUserDetailsRequest' responses: '204': description: No Content '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' '422': description: Client Error content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' '401': description: Unauthorized '403': description: Forbidden security: - OAuth2: - io.common delete: tags: - Users summary: Delete user operationId: Delete user parameters: - name: userId in: path description: '' required: true schema: type: integer format: int32 - name: Account in: query description: Account schema: title: Account type: int responses: '204': description: No Content '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' '401': description: Unauthorized '403': description: Forbidden security: - OAuth2: - io.common /v1/Users/{username}: get: tags: - Users summary: Returns user details by username operationId: Get user details by username parameters: - name: username in: path description: '' required: true schema: type: string - name: Account in: query description: Account schema: title: Account type: int responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/UserDetailsResponse' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' '401': description: Unauthorized '403': description: Forbidden security: - OAuth2: - io.common /v1/Users/properties: get: tags: - Users summary: Returns the list of all the properties added to the user groups operationId: Get all user properties parameters: - name: Account in: query description: Account schema: title: Account type: int responses: '200': description: Success content: application/json: schema: type: array items: type: string '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' '401': description: Unauthorized '403': description: Forbidden security: - OAuth2: - io.common /v1/Users/definedProperties: get: tags: - Users summary: Get the defined properties for users operationId: Get defined properties for users parameters: - name: Account in: query description: Account schema: title: Account type: int responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/GetDefinedPropertyParametersResponse' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' '401': description: Unauthorized '403': description: Forbidden security: - OAuth2: - io.common post: tags: - Users summary: Create new user property with parameters operationId: Create user defined property with parameters parameters: - name: Account in: query description: Account schema: title: Account type: int requestBody: description: '' content: application/json-patch+json; x-api-version=1.0: schema: $ref: '#/components/schemas/CreateDefinedPropertyParametersRequest' application/json; x-api-version=1.0: schema: $ref: '#/components/schemas/CreateDefinedPropertyParametersRequest' text/json; x-api-version=1.0: schema: $ref: '#/components/schemas/CreateDefinedPropertyParametersRequest' application/*+json; x-api-version=1.0: schema: $ref: '#/components/schemas/CreateDefinedPropertyParametersRequest' responses: '200': description: Success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' '401': description: Unauthorized '403': description: Forbidden security: - OAuth2: - io.common /v1/Users/definedProperties/{id}: put: tags: - Users summary: Update existing user property with parameters operationId: Update user defined property with parameters parameters: - name: id in: path description: Property parameter Id required: true schema: type: integer format: int32 - name: Account in: query description: Account schema: title: Account type: int requestBody: description: '' content: application/json-patch+json; x-api-version=1.0: schema: $ref: '#/components/schemas/UpdateDefinedPropertyParametersRequest' application/json; x-api-version=1.0: schema: $ref: '#/components/schemas/UpdateDefinedPropertyParametersRequest' text/json; x-api-version=1.0: schema: $ref: '#/components/schemas/UpdateDefinedPropertyParametersRequest' application/*+json; x-api-version=1.0: schema: $ref: '#/components/schemas/UpdateDefinedPropertyParametersRequest' responses: '200': description: Success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' '401': description: Unauthorized '403': description: Forbidden security: - OAuth2: - io.common delete: tags: - Users summary: Delete existing user property with parameters operationId: Delete user defined propety with parameters parameters: - name: id in: path description: Property parameter Id required: true schema: type: integer format: int32 - name: Account in: query description: Account schema: title: Account type: int responses: '200': description: Success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' '401': description: Unauthorized '403': description: Forbidden security: - OAuth2: - io.common /v1/Users/definedProperties/bulk: post: tags: - Users summary: Bulk upsert/delete user properties with parameters operationId: Create or update user defined propeties with parameters parameters: - name: Account in: query description: Account schema: title: Account type: int requestBody: description: '' content: application/json-patch+json; x-api-version=1.0: schema: type: array items: $ref: '#/components/schemas/BulkUpsertDefinedPropertyParametersRequest' application/json; x-api-version=1.0: schema: type: array items: $ref: '#/components/schemas/BulkUpsertDefinedPropertyParametersRequest' text/json; x-api-version=1.0: schema: type: array items: $ref: '#/components/schemas/BulkUpsertDefinedPropertyParametersRequest' application/*+json; x-api-version=1.0: schema: type: array items: $ref: '#/components/schemas/BulkUpsertDefinedPropertyParametersRequest' responses: '200': description: Success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' '401': description: Unauthorized '403': description: Forbidden security: - OAuth2: - io.common /v1/Users/change-password: post: tags: - Users summary: Change user password operationId: Change user password parameters: - name: Account in: query description: Account schema: title: Account type: int requestBody: description: '' content: application/json-patch+json; x-api-version=1.0: schema: $ref: '#/components/schemas/ChangeUserPasswordRequest' application/json; x-api-version=1.0: schema: $ref: '#/components/schemas/ChangeUserPasswordRequest' text/json; x-api-version=1.0: schema: $ref: '#/components/schemas/ChangeUserPasswordRequest' application/*+json; x-api-version=1.0: schema: $ref: '#/components/schemas/ChangeUserPasswordRequest' responses: '204': description: No Content '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' '422': description: Client Error content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' '401': description: Unauthorized '403': description: Forbidden security: - OAuth2: - io.common /v1/Users/{userId}/nfcid: post: tags: - Users summary: Create or update user NFCID. (This operation allows to change users "OWN" NFCID) operationId: Create or update users NFCID parameters: - name: userId in: path description: User id required: true schema: type: integer format: int32 - name: Account in: query description: Account schema: title: Account type: int requestBody: description: Request DTO content: application/json-patch+json; x-api-version=1.0: schema: $ref: '#/components/schemas/UpdateUsersNFCIDRequest' application/json; x-api-version=1.0: schema: $ref: '#/components/schemas/UpdateUsersNFCIDRequest' text/json; x-api-version=1.0: schema: $ref: '#/components/schemas/UpdateUsersNFCIDRequest' application/*+json; x-api-version=1.0: schema: $ref: '#/components/schemas/UpdateUsersNFCIDRequest' responses: '204': description: No Content '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' '401': description: Unauthorized '403': description: Forbidden security: - OAuth2: - io.common /v1/Users/{userId}/reset-mfa: post: tags: - Users summary: Reset MFA, User can reconfigure new authenticator app operationId: User can reconfigure new authenticator parameters: - name: userId in: path description: Identity user id required: true schema: type: string - name: Account in: query description: Account schema: title: Account type: int responses: '204': description: No Content '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' '401': description: Unauthorized '403': description: Forbidden security: - OAuth2: - io.common /v1/Users/bulk: post: tags: - Users summary: Bulk insert group users operationId: Bulk insert users parameters: - name: groupId in: query description: '' schema: type: integer format: int32 - name: Account in: query description: Account schema: title: Account type: int requestBody: description: '' content: application/json-patch+json; x-api-version=1.0: schema: type: array items: $ref: '#/components/schemas/CreateUserRequest' application/json; x-api-version=1.0: schema: type: array items: $ref: '#/components/schemas/CreateUserRequest' text/json; x-api-version=1.0: schema: type: array items: $ref: '#/components/schemas/CreateUserRequest' application/*+json; x-api-version=1.0: schema: type: array items: $ref: '#/components/schemas/CreateUserRequest' responses: '204': description: No Content '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' '401': description: Unauthorized '403': description: Forbidden security: - OAuth2: - io.common /v1/Users/{userId}/password-reset-email: post: tags: - Users summary: Generate a user password reset link and send an email parameters: - name: userId in: path description: User ID required: true schema: type: integer format: int32 - name: redirectUrl in: query description: Optional redirect URL after password reset (defaults to Portal) schema: type: string - name: Account in: query description: Account schema: title: Account type: int responses: '200': description: Success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' '401': description: Unauthorized '403': description: Forbidden security: - OAuth2: - io.common /api/v1/Users/all: get: tags: - Users summary: Get all tenant users parameters: - name: AccountId in: query schema: type: integer format: int32 responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/UsersDTO' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized '403': description: Forbidden security: - OAuth2: - io.reporting components: schemas: CreateDefinedPropertyParametersRequest: type: object properties: key: type: string nullable: true showOnReports: type: boolean useAsFilter: type: boolean isRequired: type: boolean accountId: type: integer format: int32 nullable: true additionalProperties: false UpdateUserDetailsRequest: type: object properties: profileId: type: integer format: int32 firstName: type: string nullable: true lastName: type: string nullable: true email: type: string nullable: true roles: type: array items: type: string nullable: true pin: type: string nullable: true ioid: type: string nullable: true deprecated: true nfcid: type: string nullable: true twoFactorEnabled: type: boolean properties: type: object additionalProperties: type: string nullable: true mfaEnabled: type: boolean nullable: true isDashboardEnabled: type: boolean additionalProperties: false ChangeUserPasswordRequest: type: object properties: password: type: string nullable: true additionalProperties: false UserModuleListItem: type: object properties: module: type: string nullable: true permissions: type: array items: type: string nullable: true additionalProperties: false UserDetailsResponse: type: object properties: id: type: integer format: int32 username: type: string nullable: true accountId: type: integer format: int32 profileId: type: integer format: int32 firstName: type: string nullable: true lastName: type: string nullable: true fullName: type: string nullable: true readOnly: true profileName: type: string nullable: true identityId: type: string nullable: true nfcid: type: string nullable: true pin: type: string nullable: true simpleUser: type: boolean isDashboardEnabled: type: boolean email: type: string nullable: true emailConfirmed: type: boolean mfaEnabled: type: boolean ioid: type: string nullable: true vendor: type: string nullable: true roles: uniqueItems: true type: array items: type: string nullable: true properties: type: object additionalProperties: type: string nullable: true definedProperties: type: object additionalProperties: $ref: '#/components/schemas/DefinedPropertyValueDTO' nullable: true additionalProperties: false UserInfoResponse: type: object properties: id: type: integer format: int32 username: type: string nullable: true accountId: type: integer format: int32 profileId: type: integer format: int32 firstName: type: string nullable: true lastName: type: string nullable: true fullName: type: string nullable: true readOnly: true profileName: type: string nullable: true identityId: type: string nullable: true nfcid: type: string nullable: true pin: type: string nullable: true simpleUser: type: boolean isDashboardEnabled: type: boolean email: type: string nullable: true emailConfirmed: type: boolean mfaEnabled: type: boolean accounts: type: array items: $ref: '#/components/schemas/UserProfileAccountResponse' nullable: true services: type: array items: $ref: '#/components/schemas/UserServiceSubscriptions' nullable: true modules: type: array items: $ref: '#/components/schemas/UserModuleListItem' nullable: true roles: uniqueItems: true type: array items: type: string nullable: true features: type: array items: $ref: '#/components/schemas/FeatureResponse' nullable: true tenantId: type: string format: uuid additionalProperties: false CreateUserRequest: required: - firstName - lastName - profileId type: object properties: username: type: string nullable: true email: type: string nullable: true profileId: type: integer format: int32 password: type: string nullable: true firstName: minLength: 1 type: string lastName: minLength: 1 type: string roles: type: array items: type: string nullable: true pin: type: string nullable: true ioid: type: string nullable: true nfcid: type: string nullable: true twoFactorEnabled: type: boolean properties: type: object additionalProperties: type: string nullable: true nullable: true additionalProperties: false GetDefinedPropertyParametersResponse: type: object properties: id: type: integer format: int32 affinity: $ref: '#/components/schemas/ExtendedPropertyAffinity' key: type: string nullable: true showOnReports: type: boolean useAsFilter: type: boolean isRequired: type: boolean accountId: type: integer format: int32 nullable: true additionalProperties: false UserResponse: type: object properties: id: type: integer format: int32 username: type: string nullable: true accountId: type: integer format: int32 profileId: type: integer format: int32 firstName: type: string nullable: true lastName: type: string nullable: true fullName: type: string nullable: true readOnly: true profileName: type: string nullable: true identityId: type: string nullable: true nfcid: type: string nullable: true pin: type: string nullable: true simpleUser: type: boolean isDashboardEnabled: type: boolean email: type: string nullable: true emailConfirmed: type: boolean mfaEnabled: type: boolean additionalProperties: false PropertyDTO: type: object properties: key: type: string nullable: true value: type: string nullable: true additionalProperties: false Error: type: object properties: code: type: string nullable: true message: type: string nullable: true additionalProperties: false UserServiceSubscriptions: type: object properties: serviceCode: type: string nullable: true serviceId: type: string format: uuid subscriptionId: type: string format: uuid additionalProperties: false UserResponsePagedResult: type: object properties: pageSize: type: integer format: int32 readOnly: true page: type: integer format: int32 readOnly: true totalCount: type: integer format: int32 readOnly: true filteredCount: type: integer format: int32 readOnly: true data: type: array items: $ref: '#/components/schemas/UserResponse' nullable: true readOnly: true additionalProperties: false UpdateDefinedPropertyParametersRequest: type: object properties: id: type: integer format: int32 key: type: string nullable: true showOnReports: type: boolean useAsFilter: type: boolean isRequired: type: boolean accountId: type: integer format: int32 nullable: true additionalProperties: false Int32ResourceCreatedResponse: type: object properties: id: type: integer format: int32 additionalProperties: false ProblemDetails: type: object properties: type: type: string nullable: true title: type: string nullable: true status: type: integer format: int32 nullable: true detail: type: string nullable: true instance: type: string nullable: true additionalProperties: {} UserProfileAccountResponse: type: object properties: id: type: integer format: int32 accountCode: type: string nullable: true accountName: type: string nullable: true filteredItems: type: boolean isTenantPrimary: type: boolean isUserPrimary: type: boolean mfaEnabled: type: boolean tenantId: type: string format: uuid nullable: true integrationEnabled: type: boolean default: type: boolean additionalProperties: false BulkUpsertDefinedPropertyParametersRequest: type: object properties: id: type: integer format: int32 nullable: true key: type: string nullable: true showOnReports: type: boolean useAsFilter: type: boolean isRequired: type: boolean accountId: type: integer format: int32 nullable: true additionalProperties: false UsersDTO: type: object properties: username: type: string nullable: true firstName: type: string nullable: true lastName: type: string nullable: true pin: type: string nullable: true nfcId: type: string nullable: true accontId: type: integer format: int32 accountName: type: string nullable: true groupId: type: integer format: int32 groupName: type: string nullable: true userProperties: type: array items: $ref: '#/components/schemas/PropertyDTO' nullable: true additionalProperties: false UpdateUsersNFCIDRequest: type: object properties: nfcid: type: string nullable: true additionalProperties: false ExtendedPropertyAffinity: enum: - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 14 - 15 - 20 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 31 - 33 - 34 - 35 - 81 - 100 - 101 - 102 - 103 - 104 - 105 - 200 - 201 - 210 - 211 - 220 - 230 - 240 - 241 - 300 - 310 - 311 - 400 - 401 type: integer format: int32 FeatureResponse: type: object properties: featureId: type: string format: uuid featureName: type: string nullable: true description: type: string nullable: true additionalProperties: false ApiErrorResponse: type: object properties: errors: type: array items: $ref: '#/components/schemas/Error' nullable: true additionalProperties: false DefinedPropertyValueDTO: type: object properties: value: type: string nullable: true isRequired: type: boolean additionalProperties: false securitySchemes: OAuth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://identity.scanbro.com/connect/authorize tokenUrl: https://identity.scanbro.com/connect/token scopes: io.common: default scope