openapi: 3.2.0 info: title: APIHUB Registry – External Users API description: 'Public-facing API contract for APIHUB. This API is intended for external and integration clients and covers package/catalog operations, publication workflows, search, user/profile actions, and selected administration capabilities secured by APIHUB authentication schemes. ' contact: name: Netcracker Opensource Group email: opensourcegroup@netcracker.com license: name: Apache-2.0 url: https://www.apache.org/licenses/LICENSE-2.0 version: '2026.1' x-api-kind: BWC servers: - url: https://{apihub}.qubership.org description: Primary APIHUB server endpoint (use the apihub variable to select production, development, or staging). variables: apihub: description: APIHUB subdomain/environment selector (apihub=production, dev.apihub=development, staging.apihub=staging). enum: - apihub - dev.apihub - staging.apihub default: apihub security: - BearerAuth: [] - CookieAuth: [] - api-key: [] - PersonalAccessToken: [] tags: - name: Users description: APIs for the user operations. paths: /api/v2/packages/{packageId}/favor: parameters: - $ref: '#/components/parameters/packageId' post: tags: - Users summary: Favor package description: Add the package to favorite list for the user. The user is taken from the token info. operationId: postPackagesIdFavor responses: '204': description: No content content: {} '301': description: Moved Permanently headers: Location: schema: type: string description: Current ednpoint with new packageId of moved package X-New-Package-Id: schema: type: string description: New packageId of moved package '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: {} '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: PackageNotFound: $ref: '#/components/examples/PackageNotFound' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: InternalServerError: $ref: '#/components/examples/InternalServerError' /api/v2/packages/{packageId}/disfavor: parameters: - $ref: '#/components/parameters/packageId' post: tags: - Users summary: Disfavor package description: Remove the package from favorite list for the user. The user is taken from the token info. operationId: postPackagesIdDisfavor responses: '204': description: No content content: {} '301': description: Moved Permanently headers: Location: schema: type: string description: Current ednpoint with new packageId of moved package X-New-Package-Id: schema: type: string description: New packageId of moved package '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: {} '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: PackageNotFound: $ref: '#/components/examples/PackageNotFound' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: InternalServerError: $ref: '#/components/examples/InternalServerError' /api/v2/packages/{packageId}/members: parameters: - $ref: '#/components/parameters/packageId' post: tags: - Users summary: Add members to the package description: 'Add new user (one user or multiple users) with a role to the package. A member may be added to the package if the assigned role is greater than the existing one. ' operationId: postPackagesIdMembers requestBody: description: Package members assignment parameters content: application/json: schema: $ref: '#/components/schemas/MemberCreate' responses: '201': description: Created content: application/json: schema: type: object properties: members: description: List of the package's users with roles type: array items: $ref: '#/components/schemas/Member' '301': description: Moved Permanently headers: Location: schema: type: string description: Current ednpoint with new packageId of moved package X-New-Package-Id: schema: type: string description: New packageId of moved package '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: IncorrectInputParams: $ref: '#/components/examples/IncorrectInputParameters' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: PackageNotFound: $ref: '#/components/examples/PackageNotFound' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: InternalServerError: $ref: '#/components/examples/InternalServerError' get: tags: - Users summary: Get the package's members list description: List of all users and their roles, assigned to the particular package operationId: getPackagesIdMembers responses: '200': description: Success content: application/json: schema: type: object properties: members: description: List of the package's users with roles type: array items: $ref: '#/components/schemas/Member' '301': description: Moved Permanently headers: Location: schema: type: string description: Current ednpoint with new packageId of moved package X-New-Package-Id: schema: type: string description: New packageId of moved package '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: PackageNotFound: $ref: '#/components/examples/PackageNotFound' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: InternalServerError: $ref: '#/components/examples/InternalServerError' /api/v2/packages/{packageId}/members/{userId}: parameters: - $ref: '#/components/parameters/packageId' - name: userId in: path required: true description: Login of the user schema: type: string example: user1221 patch: tags: - Users summary: Package member update description: 'Change the member parameters on the package ' operationId: patchPackagesIdMembersId requestBody: description: Package member update parameters content: application/json: schema: type: object required: - roleId - action properties: roleId: type: string description: Unique role identifier. The value is the slug of role name. example: editor action: type: string description: Name of the action with user role. enum: - add - remove responses: '204': description: No content content: {} '301': description: Moved Permanently headers: Location: schema: type: string description: Current ednpoint with new packageId of moved package X-New-Package-Id: schema: type: string description: New packageId of moved package '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: IncorrectInputParams: $ref: '#/components/examples/IncorrectInputParameters' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: PackageNotFound: $ref: '#/components/examples/PackageNotFound' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: InternalServerError: $ref: '#/components/examples/InternalServerError' delete: tags: - Users summary: Package member delete description: 'Delete (unassign) the member from the package. Response variants logic: * 200 - if the user has direct role assigned to the current package AND assignment to the parent package, will be returned his inherited role. * 204 - if the user has only direct role assigned to the current package, this assignment will be deleted. ' operationId: deletePackagesIdMembersId responses: '200': description: Success content: application/json: schema: type: object properties: member: $ref: '#/components/schemas/Member' '204': description: No content content: {} '301': description: Moved Permanently headers: Location: schema: type: string description: Current ednpoint with new packageId of moved package X-New-Package-Id: schema: type: string description: New packageId of moved package '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: {} '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: {} '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: PackageNotFound: $ref: '#/components/examples/PackageNotFound' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: InternalServerError: $ref: '#/components/examples/InternalServerError' /api/v1/user: get: tags: - Users summary: Get Extended User Information description: Retrieves detailed information about the authenticated user. deprecated: true operationId: getExtendedUser security: - BearerAuth: [] - CookieAuth: [] - PersonalAccessToken: [] responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/ExtendedUser' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: {} '404': description: User Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: {} '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: InternalServerError: $ref: '#/components/examples/InternalServerError' /api/v2/user: get: tags: - Users summary: Get Extended User Information description: Retrieves detailed information about the authenticated user. operationId: getExtendedUserV2 security: - BearerAuth: [] - CookieAuth: [] - PersonalAccessToken: [] responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/ExtendedUserV2' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: {} '404': description: User Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: {} '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: InternalServerError: $ref: '#/components/examples/InternalServerError' /api/v2/users: get: tags: - Users summary: Get users list description: List of all users with detailed info operationId: getUsers parameters: - name: textFilter in: query description: Filter by userId (login)/name/email address. schema: type: string - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/page' responses: '200': description: Success content: application/json: schema: type: object properties: users: description: List of all available users type: array items: $ref: '#/components/schemas/User' examples: {} '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: {} '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: {} '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: InternalServerError: $ref: '#/components/examples/InternalServerError' /api/v2/users/{userId}: get: tags: - Users summary: Get user by id description: User's detailed info operationId: getUser parameters: - name: userId description: Unique user login (username) used to authenticate the user. in: path required: true schema: type: string example: user1221 responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/User' examples: {} '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: {} '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: {} '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: PackageNotFound: $ref: '#/components/examples/PackageNotFound' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: InternalServerError: $ref: '#/components/examples/InternalServerError' /api/v2/space: get: tags: - Users summary: Get user's private workspace description: Get personal private workspace of the current user. operationId: getSpace security: - BearerAuth: [] - CookieAuth: [] - PersonalAccessToken: [] responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/Package' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: InternalServerError: $ref: '#/components/examples/InternalServerError' post: tags: - Users summary: Create own personal private package description: 'Any user is able to create one personal private workspace (*no permissions required*) PackageId for this workspace could be set via user creation endpoint (only for new users) or generated automatically when user first logs in to apihub ' operationId: postspace security: - BearerAuth: [] - CookieAuth: [] - PersonalAccessToken: [] responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/Package' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: IncorrectInputParams: $ref: '#/components/examples/IncorrectInputParameters' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: InternalServerError: $ref: '#/components/examples/InternalServerError' /api/v2/users/{userId}/space: post: tags: - Users summary: Create personal private package for the user description: 'Any user is able to create one personal private workspace (*no permissions required*) PackageId for this workspace could be set via user creation endpoint (only for new users) or generated automatically when user first logs in to apihub ' operationId: postUsersIdAvailablePackagePromoteStatuses parameters: - name: userId description: Unique user login (username) used to authenticate the user. in: path required: true schema: type: string example: user1221 responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/Package' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: IncorrectInputParams: $ref: '#/components/examples/IncorrectInputParameters' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: InternalServerError: $ref: '#/components/examples/InternalServerError' /api/v2/users/{userId}/availablePackagePromoteStatuses: post: x-nc-api-audience: noBWC tags: - Users summary: Get list of available package publish statuses for the user. description: 'By collection of packages, **get** the available statuses for publish into for the particular user. Statuses list depends on the current user access rights for the particular package. The response is a **mapped list** of statuses to the packageIds. ' operationId: getUsersIdAvailablePackagePromoteStatuses parameters: - name: userId description: Unique user login (username) used to authenticate the user. in: path required: true schema: type: string example: user1221 requestBody: description: Packages list to check. content: application/json: schema: type: object required: - packages properties: packages: description: PackageIds list. type: array items: type: string example: - QS.CloudQSS.CPQ.Q-TMF - QS.CloudQSS.CPQ.QE-SRV required: true responses: '200': description: Success content: application/json: schema: type: object description: List of packages and available statuses. additionalProperties: type: array description: Mapped list of statuses to the packageId. items: type: string enum: - draft - release example: QS.CloudQSS.CPQ.Q-TMF: - draft - release QS.CloudQSS.CPQ.QE-SRV: - draft '400': description: default response content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: InternalServerError: $ref: '#/components/examples/InternalServerError' /api/v2/users/{userId}/profile/avatar: get: x-nc-api-audience: noBWC tags: - Users summary: Get the user avatar description: 'Get the user avatar. API returns the data of photo file in a png format. ' operationId: getUsersIdProfileAvatar security: - {} parameters: - name: userId description: Unique user login (username) used to authenticate the user. in: path required: true schema: type: string example: user1221 responses: '200': description: Success content: image/png: schema: type: string format: binary '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: IncorrectInputParams: $ref: '#/components/examples/IncorrectInputParameters' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: {} '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: {} '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: InternalServerError: $ref: '#/components/examples/InternalServerError' components: schemas: MemberCreate: description: Assign users and role to the package type: object title: MemberCreate required: - emails - roleIds properties: emails: description: List of email addresses of the users to create. type: array items: type: string format: email example: - john.doe@example.com roleIds: type: array description: List of role IDs, added to the user. items: type: string example: - owner - editor - viewer - none Member: description: User and assigned role type: object title: Member required: - user - roles properties: user: $ref: '#/components/schemas/User' roles: type: array description: List of user roles in the package. items: allOf: - $ref: '#/components/schemas/Role' - type: object properties: inheritance: type: object description: Role was inherited from this package properties: packageId: description: Package unique string identifier (full alias) type: string kind: description: Package kind type: string enum: - workspace - group name: description: Name of the package type: string example: qubership Package: description: Simple package object, without content and dependencies type: object title: Package required: - packageId - alias - kind - name - isFavorite - defaultRole properties: packageId: description: Package unique string identifier (full alias) type: string alias: type: string description: Package short alias (abbreviation) maxLength: 10 pattern: ^[a-zA-Z0-9-_] parentId: description: Parent package ID type: string kind: description: Package kind type: string enum: - workspace - group - package - dashboard name: description: Name of the package type: string description: description: Common description of the package type: string isFavorite: description: Sign of the favorite package for the caller user type: boolean default: false serviceName: description: Service name that package belongs to. Should be equal to service deployment name in kubernetes. type: string permissions: type: array description: List of user permissions applicable to the package. items: $ref: '#/components/schemas/Permission' example: - read - create_and_update_package - delete_package defaultRole: description: Default role of the package. type: string releaseVersionPattern: description: Release version mask. Value shall be inherited from parent group with the ability to override it. type: string excludeFromSearch: description: 'If true, the package (including child packages) will be ignored by global search. Changing the value of the parent package will change the value of all child packages. A child package cannot have a negative value if the parent package has a positive value. The default value for a newly created package is equal to the value from the parent package. ' type: boolean restGroupingPrefix: description: 'Regular expression used as criteria for grouping operations. Groups for the package version are calculated during publication of this version. ' type: string example: /api/v1/{group}/ ExtendedUserV2: allOf: - $ref: '#/components/schemas/User' - type: object required: - systemRole properties: systemRole: type: string description: System role of the user. accessTokenTTLSeconds: type: - integer - 'null' format: int32 description: Optional access token time-to-live in seconds. User: description: Represents an APIHUB user with identity and profile information returned by API endpoints. type: object required: - id properties: id: description: Unique user login (username) used to authenticate the user. type: string example: user1221 name: description: Name of the user type: string example: John Doe email: description: Email address of the user type: string format: email example: john.doe@example.com avatarUrl: description: URL of the user avatar image. type: string format: URL ErrorResponse: description: Standard error response returned for failed requests. Includes HTTP status, internal error code, human-readable message, optional message parameters, and optional debug details (non-production only). type: object properties: status: description: HTTP status code as an integer; expected to match the actual HTTP response status. type: number code: description: Internal string error code. Mandatory in response. type: string message: description: Human-readable error message describing what went wrong; intended for diagnostics and safe client display. type: string params: type: object description: Optional key/value parameters used to format or contextualize the error message (for example, identifiers or field names). example: id: 12345 type: string debug: description: Optional debug details (for example, stack traces). Returned only in development/test environments when verbose logging is enabled; do not rely on this field in production because it may contain sensitive data. type: string required: - status - code - message ExtendedUser: allOf: - $ref: '#/components/schemas/User' - type: object required: - gitIntegrationStatus - systemRole properties: gitIntegrationStatus: type: boolean description: Indicates if the user has active git integration. systemRole: type: string description: System role of the user. accessTokenTTLSeconds: type: - integer - 'null' format: int32 description: Optional access token time-to-live in seconds. Permission: description: Permission type: string enum: - read - create_and_update_package - delete_package - manage_draft_version - manage_release_version - manage_archived_version - user_access_management - access_token_management example: read Role: description: Represents a role with its identifier, display name, and assigned permissions. type: object title: Role required: - roleId - role - permissions properties: roleId: type: string description: Unique role identifier. The value is the slug of role name. example: editor role: type: string description: Role name. example: Editor examples: IncorrectInputParameters: description: Incorrect input parameters value: status: 400 code: APIHUB-COMMON-4001 message: Incorrect input parameters PackageNotFound: description: Package not found by ID. Response for the 404 error value: status: 404 code: APIHUB-3020 message: package with packageId = $packageId not found InternalServerError: description: 'Example: default internal server error response' value: status: 500 code: APIHUB-8000 reason: InternalServerError message: InternalServerError parameters: page: name: page in: query description: Page number schema: type: number default: 0 packageId: name: packageId in: path description: Package unique identifier (full alias) required: true schema: type: string example: QS.CloudQSS.CPQ.Q-TMF limit: name: limit in: query description: Requested number of resources to be provided in response. schema: type: number default: 100 maximum: 100 minimum: 1 securitySchemes: BearerAuth: type: http description: 'Bearer token authentication (JWT). Default security scheme for API usage. Provide Authorization: Bearer .' scheme: bearer bearerFormat: JWT CookieAuth: type: apiKey in: cookie name: apihub-access-token description: Authentication via the `apihub-access-token` cookie. api-key: type: apiKey description: API key authentication. Send the key in the api-key header. name: api-key in: header BasicAuth: type: http description: Login/password authentication. scheme: basic PersonalAccessToken: type: apiKey description: Personal access token authentication. Send the token in the X-Personal-Access-Token header; use for user-issued/script access. name: X-Personal-Access-Token in: header RefreshTokenAuth: type: apiKey in: cookie name: apihub-refresh-token description: Authentication via refresh token cookie externalDocs: description: Find out more about this project and repository documentation url: https://github.com/Netcracker/qubership-apihub