openapi: 3.2.0 info: title: APIHUB Registry – External Packages 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: Packages description: APIs for the package management. paths: /api/v4/activity: get: tags: - Packages summary: Get activity history description: 'Get activity history. Return the last N events in descending date order. ' operationId: getActivityV4 parameters: - name: onlyFavorite description: '* If true, then only events from packages that are favorites for the current user shall be returned (including all child groups/packages/dashboards for favorite groups/workspaces) * If false, events for all packages shall be returned. ' in: query schema: type: boolean default: false - name: onlyShared in: query description: filter only shared packages schema: type: boolean default: false - name: kind in: query description: 'Filter by package kind. The list of values is acceptable. In this case, the following pattern will be used: ```?kind=group,package,dashboard```. ' schema: type: array items: type: string enum: - workspace - group - package - dashboard example: - group - package - dashboard - name: types description: 'Filter for events by group types: * package_members - grant_role, update_role, delete_role. * package_security - generate_api_key, revoke_api_key. * new_version - publish_new_version. * package_version - patch_version_meta, delete_version, publish_new_revision, delete_revision. * package_management - create_package, delete_package, patch_package_meta. * operations_group - create_manual_group, delete_manual_group, update_operations_group_parameters ' in: query schema: type: array items: type: string enum: - package_members - package_security - new_version - package_version - package_management - operations_group - name: textFilter in: query description: Filter by userName/packageName schema: type: string - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/page' responses: '200': description: Success content: application/json: schema: type: object properties: events: type: array items: type: object required: - date - principal - packageId - packageName - kind - params properties: date: description: Date when event was generated type: string format: date-time principal: $ref: '#/components/schemas/ActivityHistoryPrincipal' packageId: description: Package unique string identifier (full alias) type: string packageName: description: Package name type: string kind: description: Package kind type: string enum: - workspace - group - package - dashboard eventType: description: Activity event type type: string enum: - generate_api_key - revoke_api_key - create_package - delete_package - grant_role - delete_role - update_role - publish_new_version - delete_version - delete_revision - publish_new_revision - patch_version_meta - patch_package_meta - create_manual_group - delete_manual_group - update_operations_group_parameters - update_document_shareability params: type: object description: Events specific params oneOf: - type: object title: ParamsForGrantAndDeleteRole description: params for grant_role and delete_role events required: - memberId - memberName - roles properties: memberId: description: Login of the member type: string example: user1221 memberName: description: User which was added/deleted to/from package with some role(s) type: string example: John Doe roles: type: array items: $ref: '#/components/schemas/Role' - type: object title: ParamsForUpdateRole description: params for update_role event required: - memberId - memberName properties: memberId: description: Login of the member type: string example: user1221 memberName: description: User which was added/deleted to/from package with some role(s) type: string example: John Doe - type: object title: ParamsForPublishAndDeleteVersion description: params for publish_new_version and delete_version events required: - version - status properties: version: description: Package version name. type: string example: '22.3' status: $ref: '#/components/schemas/VersionStatusEnum' - type: object title: ParamsForPublishNewRevision description: params for publish_new_revision event required: - version - revision - status properties: version: description: Package version name. type: string example: '22.3' revision: description: Number of the revision. type: integer format: int32 example: 3 status: $ref: '#/components/schemas/VersionStatusEnum' - type: object title: ParamsForUpdateVersionMeta description: params for patch_version_meta event required: - version - versionMeta properties: version: description: Package version name. type: string example: '22.3' versionMeta: description: List of parameters that was updated in version type: array items: type: string enum: - status - label - type: object title: ParamsForPatchPackageMeta description: params for patch_package_meta event required: - packageMeta properties: packageMeta: description: List of parameters that was updated in package type: array items: type: string enum: - name - description - serviceName - defaultRole - type: object title: ParamsForPostDeleteManualGroups description: 'params for the following events: * create_manual_group * deleted_manual_group ' required: - version - groupName - apiType properties: version: description: Package version name. The @ mask is used to return the revision number. type: string example: 22.3@2 notLatestRevision: type: boolean default: false description: If parameter is not returned, then it is latest revision. groupName: description: Manual group name type: string apiType: type: string enum: - rest - graphql - protobuf - asyncapi - type: object title: ParamsForPatchOperationsGroup description: 'params for the update_operations_group_parameters event ' required: - version - groupName - groupsParams - isPrefixGroup - apiType properties: version: description: Package version name. The @ mask is used to return the revision number. type: string example: 22.3@2 apiType: type: string enum: - rest - graphql - asyncapi notLatestRevision: description: If parameter is not returned, then it is latest revision. type: boolean default: false groupName: description: Manual group name type: string groupsParams: description: List of parameters that was updated in group type: array items: type: string enum: - name - description - template - operations isPrefixGroup: type: boolean description: true - if the group created automatically via restGroupingPrefix. - type: object title: ParamsForDeleteRevision description: 'params for delete_revision event ' required: - version - status properties: version: description: Package version name with revision. The @ format is used. type: string example: 4@2 status: $ref: '#/components/schemas/VersionStatusEnum' - type: object title: ParamsForUpdateDocumentShareability description: params for update_document_shareability event required: - version - documentDisplayName - shareabilityStatus properties: version: description: Package version name. The @ mask is used to return the revision number. type: string example: 22.3@2 notLatestRevision: type: boolean default: false description: If parameter is not returned, then it is latest revision. documentDisplayName: description: Title + version of the document whose shareability was updated type: string example: API Specification 1.0.0 shareabilityStatus: description: New shareability status type: string enum: - shareable - non-shareable - unknown '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: {} '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: IncorrectInputParams: $ref: '#/components/examples/IncorrectInputParameters' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: InternalServerError: $ref: '#/components/examples/InternalServerError' /api/v2/packages: post: tags: - Packages summary: Create a new package description: Create a new package in APIHUB registry. operationId: postPackages requestBody: description: Package for creation content: application/json: schema: $ref: '#/components/schemas/PackageCreate' examples: {} required: true responses: '201': description: Created content: application/json: schema: allOf: - $ref: '#/components/schemas/Package' - type: object properties: parents: description: List of all parent packages type: array items: $ref: '#/components/schemas/PackageList' examples: {} '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: {} '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' get: tags: - Packages summary: Get packages list description: Retrieve the packages list. operationId: getPackages parameters: - name: parentId in: query description: Filter by the parent package Id. schema: type: string example: QS.CQSS.CPQ - name: kind in: query description: 'Filter the packages by kind. The list of values is acceptable. In this case, the following pattern will be used: ```?kind=group,package,dashboard```. If not transmitted, the default value will be used. ' schema: type: array items: type: string enum: - workspace - group - package - dashboard default: - workspace example: - group - package - dashboard - name: showAllDescendants in: query description: 'Show all the descendants to the parent workspace or group. * If ```true```, return the list of all child groups/packages/dashboards to the parentId (take into account all other filter parameters). * If the parentId is not transmitted??? * If the parent is transmitted, but kind not - and parentId = package??? ' schema: type: boolean default: false - name: textFilter in: query description: filter by name/alias/label. schema: type: string - name: onlyFavorite in: query description: filter only favorite packages schema: type: boolean default: false - name: onlyShared in: query description: filter only shared packages schema: type: boolean default: false - name: lastReleaseVersionDetails in: query description: 'Show/hide the detailed info about the last release version and it''s changes, comparing with the previous one. ' schema: type: boolean default: false - name: serviceName description: Service name that package belongs to. Should be equal to service deployment name in kubernetes. in: query schema: type: string example: quote-tmf-service - $ref: '#/components/parameters/showParents' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/page' responses: '200': description: Success content: application/json: schema: description: Whole packages list with paging. type: object properties: packages: type: array title: Detailed package items: required: - packageId - alias - name allOf: - $ref: '#/components/schemas/Package' - type: object properties: parents: description: List of all parent packages type: array items: $ref: '#/components/schemas/PackageList' lastReleaseVersionDetails: type: object description: 'Details about the last release version and it''s changes with previous version. * Returns only if the lastReleaseVersionDetails:true and the lastReleaseVersion is explicitly filled in on a package. * Otherwise - will be omitted in the answer. ' properties: version: description: 'Last release version specified on the package.The @ mask is used to return the revision number. ' type: string example: 2022.4@2 notLatestRevision: type: boolean default: false summary: $ref: '#/components/schemas/ChangeSummary' examples: {} '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: {} '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: InternalServerError: $ref: '#/components/examples/InternalServerError' /api/v2/packages/{packageId}: parameters: - $ref: '#/components/parameters/packageId' get: tags: - Packages summary: Get package by Id description: Common information about the selected package without files and references. operationId: getPackagesId parameters: - $ref: '#/components/parameters/showParents' responses: '200': description: Success content: application/json: schema: allOf: - $ref: '#/components/schemas/Package' - type: object properties: parents: description: List of all parent packages type: array items: allOf: - $ref: '#/components/schemas/PackageList' - type: object properties: hasReadPermission: type: boolean description: true - if current user has read permission fot this package defaultReleaseVersion: description: 'Default release version for the package. Only `release` version may be placed as default. Return the error otherwise. The @ mask is used to return the revision number. ' type: string example: 2023.1@5 defaultVersion: description: 'Default release version for the package. It is calculable by the algorithm: * If defaultReleaseVersion is filled in on the package explicitly, return it. * If not - return the last published version (by name) with "release" status. * If there were no published release versions, return the last published "draft" version (by date). * Otherwise - return "". The @ mask is used to return the revision number. ' type: string example: 2023.1@5 examples: Package: $ref: '#/components/examples/Package' '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' patch: tags: - Packages summary: Change the package's parameters description: 'Change the package''s parameters. * If the parameter is not transmitted in request - its value stays unchanged. * The empty parameter value in request sets the empty value in database. ' operationId: patchPackagesId requestBody: description: Package update parameters content: application/json: schema: $ref: '#/components/schemas/PackageUpdate' responses: '200': description: Success content: application/json: schema: allOf: - $ref: '#/components/schemas/Package' - type: object properties: parents: description: List of all parent packages type: array items: $ref: '#/components/schemas/PackageList' defaultReleaseVersion: description: 'Default release version for the package. Only `release` version may be placed as default. Return the error otherwise. ' type: string example: '2023.1' examples: {} '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' 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' '422': description: Unprocessable Entity 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' delete: tags: - Packages summary: Delete package description: Delete the package and all included published versions. operationId: deletePackagesId 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: {} '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' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: PackageReferencedByDashboard: $ref: '#/components/examples/PackageReferencedByDashboard' GroupOrWorkspaceReferencedByDashboard: $ref: '#/components/examples/GroupOrWorkspaceReferencedByDashboard' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: InternalServerError: $ref: '#/components/examples/InternalServerError' /api/v1/packages/{packageId}/exportConfig: parameters: - $ref: '#/components/parameters/packageId' get: tags: - Packages summary: Get package configuration for documents export settings. description: Returns information about the configured document export settings for the current package. operationId: getPackageIdExportConfig responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/PackageExportConfig' '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' patch: tags: - Packages summary: Change parameter of package export config. description: "Change parameter of package export config:\n - If the parameter is not transmitted in request - its value stays unchanged.\n - The empty parameter value in request sets the empty value in database.\n\"create_and_update_package\" permission is necessary to update package export config.\n" operationId: patchPackagesIdExportConfig requestBody: description: Parameters of package export config for update. content: application/json: schema: $ref: '#/components/schemas/PackageExportConfigUpdate' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/PackageExportConfig' examples: {} '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' 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' '422': description: Unprocessable Entity 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/v4/packages/{packageId}/activity: get: tags: - Packages summary: Get activity history for the package description: 'Get activity history for specific package. Return the last N events in descending date order. ' operationId: getPackageIdActivityV4 parameters: - name: packageId description: Package unique string identifier (full alias). in: path required: true schema: type: string - name: types description: 'Filter for events by group types: * package_members - grant_role, update_role, delete_role. * package_security - generate_api_key, revoke_api_key. * new_version - publish_new_version. * package_version - patch_version_meta, delete_version, publish_new_revision, delete_revision. * package_management - create_package, delete_package, patch_package_meta. * operations_group - create_manual_group, delete_manual_group, update_operations_group_parameters ' in: query schema: type: array items: type: string enum: - package_members - package_security - new_version - package_version - package_management - operations_group - name: includeRefs in: query description: If true, then events for specified package and all its referenced packages (on any level of hierarchy) shall be returned schema: type: boolean default: false - name: textFilter in: query description: Filter by userName/packageName schema: type: string - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/page' responses: '200': description: Success content: application/json: schema: type: object properties: events: type: array items: type: object required: - date - principal - packageId - packageName - kind - params properties: date: description: Date when event was generated type: string format: date-time principal: $ref: '#/components/schemas/ActivityHistoryPrincipal' packageId: description: Package unique string identifier (full alias) type: string packageName: description: Package name type: string kind: description: Package kind type: string enum: - workspace - group - package - dashboard eventType: description: Activity event type type: string enum: - generate_api_key - revoke_api_key - create_package - delete_package - grant_role - delete_role - update_role - publish_new_version - delete_version - delete_revision - publish_new_revision - patch_version_meta - patch_package_meta - create_manual_group - delete_manual_group - update_operations_group_parameters - update_document_shareability params: type: object description: Events specific params oneOf: - type: object title: ParamsForGrantAndDeleteRole description: params for grant_role and delete_role events required: - memberId - memberName - roles properties: memberId: description: Login of the member type: string example: user1221 memberName: description: User which was added/deleted to/from package with some role(s) type: string example: John Doe roles: type: array items: $ref: '#/components/schemas/Role' - type: object title: ParamsForUpdateRole description: params for update_role event required: - memberId - memberName properties: memberId: description: Login of the member type: string example: user1221 memberName: description: User which was added/deleted to/from package with some role(s) type: string example: John Doe - type: object title: ParamsForPublishAndDeleteVersion description: params for publish_new_version and delete_version events required: - version - status properties: version: description: Package version name. The @ mask is used to return the revision number. type: string example: 22.3@1 notLatestRevision: type: boolean default: false status: $ref: '#/components/schemas/VersionStatusEnum' - type: object title: ParamsForPublishNewRevision description: params for publish_new_revision event required: - version - status properties: version: description: Package version name. The @ mask is used to return the revision number. type: string example: 22.3@2 notLatestRevision: type: boolean default: false status: $ref: '#/components/schemas/VersionStatusEnum' - type: object title: ParamsForUpdateVersionMeta description: params for patch_version_meta event required: - version - versionMeta properties: version: description: Package version name. The @ mask is used to return the revision number. type: string example: 22.3@2 notLatestRevision: type: boolean default: false versionMeta: description: List of parameters that was updated in version type: array items: type: string enum: - status - label - type: object title: ParamsForPatchPackageMeta description: params for patch_package_meta event required: - packageMeta properties: packageMeta: description: List of parameters that was updated in package type: array items: type: string enum: - name - description - serviceName - defaultRole - type: object title: ParamsForPostDeleteManualGroups description: 'params for the following events: * create_manual_group * deleted_manual_group ' required: - version - groupName - apiType properties: version: description: Package version name. The @ mask is used to return the revision number. type: string example: 22.3@2 notLatestRevision: type: boolean default: false description: If parameter is not returned, then it is latest revision. groupName: description: Manual group name type: string apiType: type: string enum: - rest - graphql - protobuf - asyncapi - type: object title: ParamsForPatchOperationsGroup description: 'params for the update_operations_group_parameters event ' required: - version - groupName - groupsParams - isPrefixGroup - apiType properties: version: description: Package version name. The @ mask is used to return the revision number. type: string example: 22.3@2 notLatestRevision: description: If parameter is not returned, then it is latest revision. type: boolean default: false groupName: description: Manual group name type: string groupsParams: description: List of parameters that was updated in group type: array items: type: string enum: - name - description - template - operations isPrefixGroup: type: boolean description: true - if the group created automatically via restGroupingPrefix. apiType: type: string enum: - rest - graphql - protobuf - asyncapi - type: object title: ParamsForDeleteRevision description: 'params for delete_revision event ' required: - version - status properties: version: description: Package version name with revision. The @ format is used. type: string example: 4@2 status: $ref: '#/components/schemas/VersionStatusEnum' - type: object title: ParamsForUpdateDocumentShareability description: params for update_document_shareability event required: - version - documentDisplayName - shareabilityStatus properties: version: description: Package version name. The @ mask is used to return the revision number. type: string example: 22.3@2 notLatestRevision: type: boolean default: false description: If parameter is not returned, then it is latest revision. documentDisplayName: description: Title + version of the document whose shareability was updated type: string example: API Specification 1.0.0 shareabilityStatus: description: New shareability status type: string enum: - shareable - non-shareable - unknown '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: {} '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: IncorrectInputParams: $ref: '#/components/examples/IncorrectInputParameters' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: InternalServerError: $ref: '#/components/examples/InternalServerError' /api/v2/packages/{packageId}/favor: parameters: - $ref: '#/components/parameters/packageId' post: tags: - Packages 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: - Packages 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}/publish/availableStatuses: parameters: - $ref: '#/components/parameters/packageId' get: tags: - Packages summary: Get a list of available publish statuses for the package deprecated: true description: 'Get a list of available publish statuses for the package. List depends on the current user access rights. ' operationId: getPackagesIdAvailableStatuses responses: '200': description: Success content: application/json: schema: type: object properties: statuses: description: List of available statuses. type: array items: $ref: '#/components/schemas/VersionStatusEnum' '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' '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' components: schemas: ApiKey: title: ApiKey type: object required: - id - name properties: id: description: ApiKey unique identifier type: string name: description: ApiKey name type: string 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}/ VersionStatusEnum: description: Package version status type: string enum: - draft - release - archived PackageList: description: Base package object for parents list. type: object title: PackageList 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 PackageExportConfigUpdate: description: Parameters for update of package export config. type: object properties: allowedOasExtensions: description: 'List of OAS extensions that shall be preserverd when user exports OpenAPI specification(s) with remove OAS extensions option. List of OAS extensions is unique within current package.\ The full list of direct extensions must be included in the request, as the request replaces the items in the array rather than adding to them. ' type: array uniqueItems: true items: type: string pattern: ^x- example: - x-internal-info - x-design-details ActivityHistoryPrincipal: description: User, API key or automatic job allOf: - oneOf: - $ref: '#/components/schemas/User' - $ref: '#/components/schemas/ApiKey' - $ref: '#/components/schemas/Job' - type: object required: - type properties: type: description: Identifies whether principal is user, API key or automatic job type: string enum: - user - apiKey - job 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 PackageUpdate: description: Parameters for the package update. Not changed parameters must not be transmitted. Parameters, required in creation, must not be empty if transmitted. type: object properties: name: description: Name of the package type: string description: description: Common description of the package type: string serviceName: description: 'Service name that package belongs to. Should be equal to service deployment name in kubernetes. Parameter may be changed (filled in) only it was empty in creation. Otherwise, the 400 error will be returned. ' type: string defaultRole: description: Default role of the package. type: string defaultReleaseVersion: description: 'Default release version for the package. Only `release` version may be placed as default. Return the error otherwise. ' type: string example: '2023.1' 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. type: string 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 ChangeSummary: description: 'Numbers of changes between the current and previous published version. ' type: object properties: breaking: description: Number of changes, breaking the backward compatibility. type: integer default: 0 semi-breaking: description: Number of changes, breaking the backward compatibility in a legal way. For example, deleting correctly deprecated endpoint. type: integer default: 0 deprecated: description: Number of deprecated endpoints. type: integer default: 0 non-breaking: description: Number of non-breaking changes. type: integer default: 0 annotation: description: Number of annotation changes. type: integer default: 0 unclassified: description: Number of unclassified changes. type: integer default: 0 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 PackageCreate: description: Parameters for the package creation required: - alias - name - kind type: object properties: parentId: description: Parent package ID type: string kind: description: 'Package kind. * If kind = workspace, the parentId will be ignored. * If kind = group or package or dashboard, the parentId is required. ' type: string enum: - workspace - group - package - dashboard name: description: Name of the new package type: string alias: description: Package short alias (abbreviation) type: string maxLength: 10 pattern: ^[a-zA-Z0-9-_] description: description: Common description of the package type: string serviceName: description: 'Service name that package belongs to. Should be equal to service deployment name in kubernetes. Ignored for Workspace and Group kind. ' type: string 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 PackageExportConfig: description: Configuration for documents export settings. type: object properties: allowedOasExtensions: description: List of OAS extensions that shall be preserverd when user exports OpenAPI specification(s) with remove OAS extensions option. type: array items: type: object properties: oasExtension: description: 'OAS extension that shall be preserverd when user exports OpenAPI specification(s) with remove OAS extensions option. ' type: string pattern: ^x- example: x-internal-info packageId: description: 'Id of the package in which the extension was specified. This can be the id of the current package or the parent package if the extension is inherited. ' type: string example: WS.GRP.PCKG packageName: description: Name of the package in which the extension was specified. type: string example: Resource Inventory packageKind: description: Kind of the package in which the extension was specified. type: string enum: - workspace - group - package Job: description: Automatic job type: object required: - id - name properties: id: type: string description: Job identifier name: type: string description: Job name examples: Package: description: Example of the package params value: packageId: QS.QSS.PRG.APIHUB parentId: QS.QSS.PRG kind: package name: Test package alias: APIHUB description: Package for the test purpose isFavorite: false serviceName: apihub-be defaultRole: Viewer InternalServerError: description: 'Example: default internal server error response' value: status: 500 code: APIHUB-8000 reason: InternalServerError message: InternalServerError GroupOrWorkspaceReferencedByDashboard: description: Group or workspace cannot be deleted because dashboard versions reference packages inside it. value: status: 409 code: '8500' message: 'Cannot delete $kind $packageId: it contains packages that are referenced by dashboards: $packages. Remove the references or delete the dashboards, then retry.' params: kind: group packageId: sample.group packages: sample.group.package1 (sample.dashboard|2024.2@3, other.dashboard|2024.1@1), sample.group.package2 (other.dashboard|1.0@1) 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 IncorrectInputParameters: description: Incorrect input parameters value: status: 400 code: APIHUB-COMMON-4001 message: Incorrect input parameters PackageReferencedByDashboard: description: Package cannot be deleted because one or more dashboard versions reference it. value: status: 409 code: '8500' message: 'Cannot delete package $packageId: it is referenced by these dashboard versions: $dashboards. Remove the references or delete the dashboards, then retry.' params: packageId: sample.package dashboards: sample.dashboard|2024.2@3, other.dashboard|2024.1@1 parameters: packageId: name: packageId in: path description: Package unique identifier (full alias) required: true schema: type: string example: QS.CloudQSS.CPQ.Q-TMF showParents: name: showParents in: query description: Show/hide the list of parent packages. schema: type: boolean default: false page: name: page in: query description: Page number schema: type: number default: 0 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