openapi: 3.0.3 info: title: Gravitee.io APIM - Management API - Installation description: |- This is the OpenAPI specification for our new version of APIM Management API. contact: email: team-apim@graviteesource.com license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html version: 2.0.0 security: - BasicAuth: [] - CookieAuth: [] servers: - url: "/management/v2" description: APIM Management API v2 - Default base URL - url: "/management/v2/organizations/{orgId}" description: APIM Management API v2 - Base URL to target specific organizations variables: orgId: description: The unique ID of your organization default: DEFAULT tags: - name: Installation description: Base resources about the installation paths: /environments: get: parameters: - $ref: "#/components/parameters/pageParam" - $ref: "#/components/parameters/perPageParam" tags: - Installation summary: List all environments. description: |- List all environments accessible by the current user. User must be authenticated. operationId: getEnvironments responses: "200": $ref: "#/components/responses/EnvironmentsResponse" default: $ref: "#/components/responses/Error" /environments/{envId}: parameters: - $ref: "#/components/parameters/envIdParam" get: tags: - Installation summary: Get a specific environment description: |- Get a specific environment. User must be authenticated. operationId: getEnvironmentById responses: "200": description: An environment content: application/json: schema: $ref: "#/components/schemas/Environment" default: $ref: "#/components/responses/Error" /organizations/{orgId}: servers: - url: /management/v2 description: Gravitee.io APIM - Management API - v2 parameters: - $ref: "#/components/parameters/orgIdParam" get: tags: - Installation summary: Get a specific organization description: |- Get a specific organization User must be authenticated. operationId: getOrganizationById responses: "200": description: An organization content: application/json: schema: $ref: "#/components/schemas/Organization" default: $ref: "#/components/responses/Error" /organizations/{orgId}/license: servers: - url: /management/v2 description: Gravitee.io APIM - Management API -v2 parameters: - $ref: "#/components/parameters/orgIdParam" get: tags: - Installation summary: Get the license used by an organization. description: |- Returns the organization license information. If no license is scoped to the organization, then the platform license is returned. User must be authenticated. operationId: getOrganizationLicense responses: "200": description: |- The license and its features. If there is no license, then the features will be empty. content: application/json: schema: $ref: "#/components/schemas/GraviteeLicense" default: $ref: "#/components/responses/Error" /organizations/{orgId}/promotions/{promotionId}/_process: servers: - url: /management/v2 description: Gravitee.io APIM - Management API -v2 parameters: - $ref: "#/components/parameters/orgIdParam" - $ref: "#/components/parameters/promotionIdParam" post: tags: - Promotions summary: Process an API promotion. description: |- Accept or reject an API promotion. operationId: processApiPromotion requestBody: content: application/json: schema: type: object properties: accept: type: boolean description: Accept or reject the API promotion. example: true required: true responses: "200": description: The processed API promotion. content: application/json: schema: $ref: "#/components/schemas/Promotion" default: $ref: "#/components/responses/Error" components: schemas: Environment: type: object properties: id: type: string description: Environment's uuid. example: 00f8c9e7-78fc-4907-b8c9-e778fc790750 name: type: string description: Environment's name. Duplicate names can exists. example: My Environment minLength: 1 description: type: string description: Environment's description. A short description of your Environment. example: I can use many characters to describe this Environment. minLength: 1 Error: type: object properties: httpStatus: type: integer format: int32 description: The error code example: 400 message: type: string description: The error message example: Bad request technicalCode: type: string description: A technical code to identify the error example: invalid.import.definition parameters: type: object description: A map of parameters to be used in the error message additionalProperties: type: string details: type: array description: A list of details about the error items: type: object properties: message: type: string description: The error message example: Bad request location: type: string description: The json path of the field in error. example: updateApi.properties[0].key invalidValue: description: The invalid value. GraviteeLicense: type: object properties: tier: type: string description: The tier gravitee is running on. example: "tier-planet" packs: type: array items: type: string description: The packs included in the tier gravitee is running on. example: - "pack-observability" - "pack-event-native" features: type: array items: type: string description: The features included in the tier gravitee is running on. example: - feature-debug-mode - feature-datadog-reporter expiresAt: type: string format: date-time description: The date (as timestamp) when the license will expire. example: 1581256457163 isExpired: type: boolean description: If the license is expired. example: false scope: type: string description: The scope of the license. example: "PLATFORM" Links: description: List of links for pagination properties: self: type: string description: Link to current resource first: type: string description: In a paginated response, link to the first page last: type: string description: In a paginated response, link to the last page previous: type: string description: In a paginated response, link to the previous page. Maybe null if current is the first page next: type: string description: In a paginated response, link to the next page. Maybe null if current is the last page MetadataResponse: description: Generic object to handle additional information about an entity. Can also be used for pagination data. type: object Organization: type: object properties: id: type: string description: Organization's uuid. example: 00f8c9e7-78fc-4907-b8c9-e778fc790750 name: type: string description: Organization's name. Duplicate names can exists. example: My Organization minLength: 1 description: type: string description: Organization's description. A short description of your Organization. example: I can use many characters to describe this Organization. minLength: 1 Promotion: type: object properties: id: type: string description: The promotion id. example: df83b2a4-cc3e-3f80-9f0d-c138c106c076 apiDefinition: type: string description: The api definition. apiId: type: string description: The api id. example: df83b2a4-cc3e-3f80-9f0d-c138c106c076 status: type: string description: The status of the promotion. enum: - CREATED - TO_BE_VALIDATED - ACCEPTED - REJECTED - ERROR targetEnvCockpitId: type: string description: The target environment id where the promotion should be done. example: df83b2a4-cc3e-3f80-9f0d-c138c106c076 targetEnvName: type: string description: The target environment name where the promotion should be done. example: prod sourceEnvCockpitId: type: string description: The source environment id where the promotion should come from. example: df83b2a4-cc3e-3f80-9f0d-c138c106c076 sourceEnvName: type: string description: The source environment name where the promotion should come from. example: dev createdAt: type: string format: date-time description: The datetime when the promotion was created. example: 2023-05-25T12:40:46.184Z updatedAt: type: string format: date-time description: The datetime when the promotion was updated. example: 2023-05-25T12:40:46.184Z author: $ref: "#/components/schemas/PromotionAuthor" targetApiId: type: string description: The target api id. example: df83b2a4-cc3e-3f80-9f0d-c138c106c076 PromotionAuthor: type: object properties: userId: type: string description: The user id. example: df83b2a4-cc3e-3f80-9f0d-c138c106c076 displayName: type: string description: The display name of the user who created the promotion. example: John Doe email: type: string description: The email of the user who created the promotion. example: email@example.com source: type: string description: The source of the use who created the promotion. example: cockpit sourceId: type: string description: The id of the user who created the promotion source. example: 89eb0e39-1706-49c1-ab0e-391706d9c10a responses: EnvironmentsResponse: description: Page of environments content: application/json: schema: properties: data: description: List of Environments. type: array items: $ref: "#/components/schemas/Environment" metadata: $ref: "#/components/schemas/MetadataResponse" links: $ref: "#/components/schemas/Links" Error: description: Generic error response content: application/json: schema: $ref: "#/components/schemas/Error" parameters: pageParam: name: page in: query required: false description: The page number for pagination. schema: type: integer default: 1 perPageParam: name: perPage in: query required: false description: | The number of items per page for pagination. schema: type: integer default: 10 envIdParam: name: envId in: path required: true description: Id or Hrid (Human readable Id) of an environment. schema: type: string default: DEFAULT orgIdParam: name: orgId in: path required: true description: Id of an organization. schema: type: string default: DEFAULT promotionIdParam: name: promotionId in: path required: true description: Id of a promotion. schema: type: string securitySchemes: BasicAuth: type: http scheme: basic CookieAuth: type: apiKey in: cookie name: Auth-Graviteeio-APIM