swagger: "2.0"
info:
  title: "Citrix APIGW Configuration API"
  version: "1.0"
host: 'adm.cloud.com'
#basePath: /apisec/nitro/v1/config
schemes:
  - https
tags:
  - name: "API Definitions"
    description: "Create and manage your API Definitions"
  - name: "API Proxies"
    description: "Create and manage your API Proxies endpoint configuration"
  - name: "Proxy Actions"
    description: "Deploy/Undeploy your API Proxy endpoint configuration on API Gateway (Citrix ADC)"
  - name: "Deployments"
    description: "Create and manage your API Deployment instances with proxy, upstream services and API routes"
  - name: "Deployment Actions"
    description: "Deploy/Undeploy your API Deployment configurations on API Gateway (Citrix ADC)"
  - name: "Upstream Services"
    description: "Manage your Upstream service configurations"
  - name: "Routes"
    description: "Manage your API routes configurations"
  - name: "Policies"
    description: "Manage your API security policy configurations"
  - name: "Policy Actions"
    description: "Deploy or undeploy your API security policy configurations on API Gateway (Citrix ADC)"

parameters:
  authHeaderParam:
    in: header
    name: Authorization
    type: string
    required: true
    description: Session ID for authentication. The value must be mentioned in the format CwcAuth bearer=sessionIdValue.
  iscloudHeaderParam:
    in: header
    name: isCloud
    type: string
    description: Set the value to true in case of Cloud services. Set to false for on-premises deployment.
    required: true
  customerid:
    in: path
    name: customerid
    type: string
    required: true
    description: Customer ID of the user

    ## dummy comment for creating PR for reviews

paths:
  /massvc/{customerid}/apisec/nitro/v1/config/upstreamservices/{id}:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    get:
      tags:
        - "Upstream Services"
      description: "Get Upstream service for the provided ID"
      operationId: GetUpstreamServiceById
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "Upstream service ID"
          type: string
      responses:
        "200":
          description: "Response with Upstream service and its attributes for the provided ID"
          schema:
            $ref: "#/definitions/getUpstreamServiceResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"
    delete:
      tags:
        - "Upstream Services"
      description: "Delete Upstream service for the provided ID"
      operationId: DeleteUpstreamServiceById
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "Upstream service ID"
          type: string
      responses:
        "204":
          description: "Successfully deleted Upstream service for the provided ID"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"
    put:
      tags:
        - "Upstream Services"
      description: "Update Upstream service for the provided ID"
      operationId: ModifyUpstreamServiceById
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "Upstream service ID"
          type: string
        - name: Body
          in: body
          description: "Payload to update Upstream service"
          required: true
          schema:
            $ref: "#/definitions/modifyUpstreamServiceRequest"
      responses:
        "200":
          description: "Response with Updated Upstream service and its attribute for the provided ID"
          schema:
            $ref: "#/definitions/modifyUpstreamServiceResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/routes/{id}:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    get:
      tags:
        - "Routes"
      description: "Get API Route for the provided ID"
      operationId: GetApiRouteById
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Route ID"
          type: string
      responses:
        "200":
          description: "Response with API Route and its attributes for the provided ID"
          schema:
            $ref: "#/definitions/getAPIRouteResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"
    delete:
      tags:
        - "Routes"
      description: "Delete API Route for the provided ID"
      operationId: DeleteApiRouteById
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Route ID"
          type: string
      responses:
        "204":
          description: "Successfully deleted API Route for the provided ID"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/policies/{id}:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    get:
      tags:
        - "Policies"
      description: "Get API Security Policy for the provided ID"
      operationId: GetApiPolicyById
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Policy ID"
          type: string
      responses:
        "200":
          description: "Response with API Policies and its attribute for the provided ID"
          schema:
            $ref: "#/definitions/getAPIPolicyResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"
    delete:
      tags:
        - "Policies"
      description: "Delete API Policy for the provided ID"
      operationId: DeleteApiPolicyById
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Policy ID"
          type: string
      responses:
        "204":
          description: "Successfully deleted API Policy for the provided ID"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"
    put:
      tags:
        - "Policies"
      description: "Update API Policy for the provided ID"
      operationId: ModifyApiPolicyById
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Policy ID"
          type: string
        - name: Body
          in: body
          description: "Payload to update API Policy"
          required: true
          schema:
            $ref: "#/definitions/modifyAPIPolicyRequest"
      responses:
        "200":
          description: "Response with Updated API Policies and its attribute for the provided ID"
          schema:
            $ref: "#/definitions/modifyAPIPolicyResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/policies/{id}/actions/applyconfig:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    post:
      tags:
        - "Policy Actions"
      description: "Deploy the API Policy configurations on to API Gateway"
      operationId: ApplyApiPolicyConfig
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Policy ID"
          type: string
      responses:
        "201":
          description: "Deploy process started."
          schema:
            $ref: "#/definitions/applyConfigOnApiGwResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "403":
          description: Permission denied error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Service error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/policies/{id}/actions/undeployconfig:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    post:
      tags:
        - "Policy Actions"
      description: "Undeploy the API Policy configurations from the Target API Gateway"
      operationId: UndeployApiPolicyConfig
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Policy ID"
          type: string
      responses:
        "201":
          description: "Undeploy process started."
          schema:
            $ref: "#/definitions/undeployConfigOnApiGwResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "403":
          description: Permission denied error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Service error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/policies/{id}/status:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    get:
      tags:
        - "Policy Actions"
      description: "Get the status of API Policy configuration deploy request"
      operationId: GetApiPolicyConfigStatus
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "Configuration object Identifier.  For e.g., ID for Policy object."
          type: string
      responses:
        "200":
          description: "Response with current Status of API Policy configuration deploy request."
          schema:
            $ref: "#/definitions/getConfigStatusResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/deployments:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    get:
      tags:
        - "Deployments"
      description: "Get list of all API deployments"
      operationId: GetAllApiDeployments
      produces:
        - "application/json"
      responses:
        "200":
          description: "Response with list of all API Deployments"
          schema:
            $ref: "#/definitions/listApiDeploymentsWithIdResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/deployments/{id}:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    get:
      tags:
        - "Deployments"
      description: "Get API deployment for the provided ID"
      operationId: GetApiDeploymentById
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Deployment ID"
          type: string
      responses:
        "200":
          description: "Response with API deployment and its attributes for the provided ID"
          schema:
            $ref: "#/definitions/getApiDeploymentResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"
    delete:
      tags:
        - "Deployments"
      description: "Delete API Deployment for the provided ID"
      operationId: DeleteApiDeploymentById
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Deployment ID"
          type: string
        - name: deep_del
          in: query
          required: false
          type: string
          default: "false"
          enum:
            - "true"
            - "false"
          description: "For True value, Delete operation will delete the API Deployment and all associated objects API Proxy, API Routes, Upstream services and API Policies. For False value, it will delete only the API Deployment if it is not referenced in any other objects."
      responses:
        "204":
          description: "Successfully deleted API Deployment for the given ID"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"
    put:
      tags:
        - "Deployments"
      description: "Update API Deployment for the provided ID"
      operationId: ModidyApiDeploymentById
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Deployment ID"
          type: string
        - name: Body
          in: body
          description: "Payload to update API Deployment"
          required: true
          schema:
            $ref: "#/definitions/modifyApiDeploymentRequest"
      responses:
        "200":
          description: "Response with Updated API Deployment and its attribute for the provided ID"
          schema:
            $ref: "#/definitions/modifyApiDeploymentResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/deployments/{id}/upstreamservices:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    get:
      tags:
        - "Deployments"
      description: "Get list of all Upstream services associated with provided API Deployment ID"
      operationId: GetAllUpstreamServicesForApiInstance
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Deployment ID"
          type: string
      responses:
        "200":
          description: "Response with list of all Upstream services associated with provided API Deployment ID"
          schema:
            $ref: "#/definitions/listAllUpstreamServicesWithIdResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"

    post:
      tags:
        - "Deployments"
      description: "Create Upstream service for the provided API Deployment ID"
      operationId: AddUpstreamServiceForApiInstance
      consumes:
        - "application/json"
      produces:
        - "application/json"
      parameters:
        - in: path
          name: id
          required: true
          description: "API Deployment ID"
          type: string
        - in: body
          name: upstreamservice
          description: "Payload to create Upstream service"
          required: true
          schema:
            $ref: "#/definitions/addUpstreamServiceRequest"
      responses:
        "201":
          description: "Successfully created Upstream service for the provided API Deployment ID"
          schema:
            $ref: "#/definitions/addUpstreamServiceResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "403":
          description: Permission denied error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Service error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/deployments/{id}/routes:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    get:
      tags:
        - "Deployments"
      description: "Get list of all API Routes associated with API Deployment ID"
      operationId: GetAllRoutesForApiInstance
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Deployment Id"
          type: string
      responses:
        "200":
          description: "Response with list of all API routes associated with API Deployment ID"
          schema:
            $ref: "#/definitions/listAllAPIRoutesWithIdResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"
    post:
      tags:
        - "Deployments"
      description: "Create API Routes for the provided API Deployment ID. Each Route comprises the API Resource path prefix and the Upstream Service name. API traffic that matches the selected resource path prefix is sent to the corresponding Upstream service."
      operationId: AddRouteForApiInstance
      consumes:
        - "application/json"
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Deployment ID"
          type: string
        - in: body
          name: route
          description: "Payload to create API Routes"
          required: true
          schema:
            $ref: "#/definitions/addAPIRouteRequest"
      responses:
        "201":
          description: "Successfully created API Routes for the provided API Deployment ID."
          schema:
            $ref: "#/definitions/addAPIRouteResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "403":
          description: Permission denied error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Service error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/deployments/{id}/policies:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    get:
      tags:
        - "Deployments"
      description: "Get list of all API Policies for the provided API Deployment ID"
      operationId: GetAllPoliciesForApiInstance
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Proxy ID"
          type: string
      responses:
        "200":
          description: "Response with list of API Policies for the provided API Deployment ID"
          schema:
            $ref: "#/definitions/listAllAPIPoliciesWithIdResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"
    post:
      tags:
        - "Deployments"
      description: "Create API Policies for the provided API Deployment ID"
      operationId: AddPoliciesForApiInstance
      consumes:
        - "application/json"
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Deployment ID"
          type: string
        - in: body
          name: policies
          description: "Payload to create API Policies"
          required: true
          schema:
            $ref: "#/definitions/addAPIPolicyRequest"
      responses:
        "201":
          description: "Successfully created API Policies for the provided API Deployment ID"
          schema:
            $ref: "#/definitions/addAPIPolicyResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "403":
          description: Permission denied error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Service error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/deployments/{id}/actions/applyconfig:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    post:
      tags:
        - "Deployment Actions"
      description: "Deploy the API Deployment configurations on to Target API Gateway"
      operationId: ApplyApiDeploymentConfig
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API deployment ID"
          type: string
      responses:
        "201":
          description: "Deploy process started."
          schema:
            $ref: "#/definitions/applyConfigOnApiGwResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "403":
          description: Permission denied error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Service error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/deployments/{id}/actions/undeployconfig:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    post:
      tags:
        - "Deployment Actions"
      description: "Undeploy the API Deployment configurations from Target API Gateway"
      operationId: UndeployApiDeploymentConfig
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API deployment ID"
          type: string
      responses:
        "201":
          description: "Undeploy process started."
          schema:
            $ref: "#/definitions/undeployConfigOnApiGwResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "403":
          description: Permission denied error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Service error
          schema:
            $ref: "#/definitions/ErrorResponse"
  /massvc/{customerid}/apisec/nitro/v1/config/deployments/{id}/status:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    get:
      tags:
        - "Deployment Actions"
      description: "Get the status of API Proxy configuration deploy request"
      operationId: GetConfigStatus
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "Configuration object Identifier.  For e.g., ID for Deployment object"
          type: string
      responses:
        "200":
          description: "Response with current Status for deployment of API Gateway configuration"
          schema:
            $ref: "#/definitions/getConfigStatusResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/apidefs:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    get:
      tags:
        - "API Definitions"
      description: "Get list of all API Definitions created on API Gateway"
      operationId: GetAllApiDefs
      produces:
        - "application/json"
      responses:
        "200":
          description: "Response with list of all API Definitions"
          schema:
            $ref: "#/definitions/listApiDefinitionsWithIdResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"
    post:
      tags:
        - "API Definitions"
      description: "Create API Definition in API Gateway"
      operationId: AddApiDefinition
      consumes:
        - "application/json"
      produces:
        - "application/json"
      parameters:
        - in: body
          name: apidef
          description: "Payload for API Definition"
          required: true
          schema:
            $ref: "#/definitions/addApiDefinitionRequest"
      responses:
        "201":
          description: "Successfully created API Definition in API Gateway"
          schema:
            $ref: "#/definitions/addApiDefinitionResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "403":
          description: Permission denied error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Service error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/apidefs/{id}:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    get:
      tags:
        - "API Definitions"
      description: "Get API Definition for the provided ID"
      operationId: GetApiDefById
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Definition Object"
          type: string
        - name: Accept
          in: header
          description: "Accept application/json"
          required: true
          type: string
      responses:
        "200":
          description: "Response with API Definition for the provided ID"
          schema:
            $ref: "#/definitions/getApiDefinitionResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"
    delete:
      tags:
        - "API Definitions"
      description: "Delete API Definition for the provided ID"
      operationId: DeleteApiDefById
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Definition ID"
          type: string
      responses:
        "204":
          description: "Successfully deleted API Definition for the provided ID"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"
    put:
      tags:
        - "API Definitions"
      description: "Update API Definition for the provided ID"
      operationId: ModifyApiDefById
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Definition ID"
          type: string
        - name: Body
          in: body
          description: "Payload to update API Definition"
          required: true
          schema:
            $ref: "#/definitions/modifyApiDefinitionRequest"
      responses:
        "200":
          description: "Response with Updated API Definition and its attributes for the provided ID"
          schema:
            $ref: "#/definitions/modifyApiDefinitionResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/apidefs/{id}/deployments:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    get:
      tags:
        - "API Definitions"
      description: "Get list of all API Deployments for provided API Definition ID"
      operationId: GetAllApiDeploymentsForApi
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Definition ID"
          type: string
        - name: Accept
          in: header
          description: "Accept - application/json"
          required: true
          type: string
      responses:
        "200":
          description: "Response with list of all API Deployment for provided API Definition ID."
          schema:
            $ref: "#/definitions/listApiDeploymentsWithIdResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"

    post:
      tags:
        - "API Definitions"
      description: "Create API Deployment, Proxy, Upstream service & Route for provided API Definition ID"
      operationId: DeployApiInstanceOnApiGw
      consumes:
        - "application/json"
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Definition ID"
          type: string
        - in: body
          name: deployment
          description: "Payload to create API Deployment, Proxy, Upstream service and Routes"
          required: true
          schema:
            $ref: "#/definitions/deployApiInstanceOnApiGwRequest"
      responses:
        "201":
          description: "Successfully created API Deployment, Proxy, Upstream service & Route for provided API Definition ID"
          schema:
            $ref: "#/definitions/deployApiInstanceOnApiGwResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "403":
          description: Permission denied error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Service error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/apiproxies:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    post:
      tags:
        - "API Proxies"
      description: "Create API Proxy endpoint on API Gateway"
      operationId: AddApiProxy
      consumes:
        - "application/json"
      produces:
        - "application/json"
      parameters:
        - in: body
          name: apiproxy
          description: "API Proxy object and Target API Gateway object."
          required: true
          schema:
              $ref: "#/definitions/AddApiProxyRequest"
      responses:
        "201":
          description: "Created Object"
          schema:
            $ref: "#/definitions/AddApiProxyResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "403":
          description: Permission denied error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Service error
          schema:
            $ref: "#/definitions/ErrorResponse"
    get:
      tags:
      - "API Proxies"
      description: "Get list of all API Proxies created on API Gateway"
      operationId: GetAllApiProxies
      produces:
        - "application/json"
      responses:
        "200":
          description: "Response with list of all API Proxies created on API Gateway"
          schema:
            $ref: "#/definitions/listApiProxiesWithIdResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/apiproxies/{id}:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    get:
      tags:
      - "API Proxies"
      description: "Get API Proxy for the provided Id"
      operationId: GetApiProxyById
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Proxy ID"
          type: string
      responses:
        "200":
          description: "Response with API Proxy object for the provided ID."
          schema:
            $ref: "#/definitions/getApiProxyResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"
    delete:
      tags:
      - "API Proxies"
      description: "Delete API Proxy for the provided ID"
      operationId: DeleteApiProxyById
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Proxy ID"
          type: string
      responses:
        "204":
          description: "Successfully deleted API Proxy for the provided ID"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"

    put:
      tags:
      - "API Proxies"
      description: "Update API Proxy for the provided ID"
      operationId: ModidyApiProxyById
      produces:
                - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Proxy ID"
          type: string
        - name: Body
          in: body
          description: "Updated API Proxy object & Target API Gateway object."
          required: true
          schema:
            $ref: "#/definitions/modifyApiProxyRequest"
      responses:
        "200":
          description: "Response with Updated API Proxy and its attributes for the provided ID"
          schema:
            $ref: "#/definitions/modifyApiProxyResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/apiproxies/{id}/deployments:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    get:
      tags:
      - "API Proxies"
      description: "Get list of all API deployment objects for the provided API proxy ID"
      operationId: GetAllDeploymentsForProxyInstance
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Proxy ID"
          type: string
      responses:
        "200":
          description: "Response with list of all API Deployment for provided API Proxy ID"
          schema:
            $ref: "#/definitions/listApiDeploymentsWithIdResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/apiproxies/{id}/actions/applyconfig:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    post:
      tags:
      - "Proxy Actions"
      description: "Deploy the API Proxy Endpoint configurations on to Target API Gateway"
      operationId: ApplyApiProxyConfig
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Proxy Object ID"
          type: string
      responses:
        "201":
          description: "Deploy process started."
          schema:
            $ref: "#/definitions/applyConfigOnApiGwResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "403":
          description: Permission denied error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Service error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/apiproxies/{id}/actions/undeployconfig:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    post:
      tags:
      - "Proxy Actions"
      description: "Undeploy the API Proxy Endpoint configurations from the Target API Gateway"
      operationId: UndeployApiProxyConfig
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "API Proxy Object ID"
          type: string
      responses:
        "201":
          description: "Undeploy process started."
          schema:
            $ref: "#/definitions/undeployConfigOnApiGwResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "403":
          description: Permission denied error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "409":
          description: Conflict
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Service error
          schema:
            $ref: "#/definitions/ErrorResponse"

  /massvc/{customerid}/apisec/nitro/v1/config/apiproxies/{id}/status:
    parameters:
      - $ref: '#/parameters/customerid'
      - $ref: '#/parameters/authHeaderParam'
      - $ref: '#/parameters/iscloudHeaderParam'
    get:
      tags:
      - "Proxy Actions"
      description: "Get the status of API Proxy configuration deploy request"
      operationId: GetApiProxyConfigStatus
      produces:
        - "application/json"
      parameters:
        - name: id
          in: path
          required: true
          description: "Configuration object Identifier.  For e.g., Id for Proxy object."
          type: string
      responses:
        "200":
          description: "Response with current Status for deployment of API Gateway configuration"
          schema:
            $ref: "#/definitions/getConfigStatusResponse"
        "400":
          description: "Bad request. Refer to error code and error message for further details in response."
          schema:
            $ref: "#/definitions/ErrorResponse"
        "401":
          description: Unauthorized
          schema:
            $ref: "#/definitions/ErrorResponse"
        "404":
          description: Resource not found
          schema:
            $ref: "#/definitions/ErrorResponse"
        "500":
          description: Server error
          schema:
            $ref: "#/definitions/ErrorResponse"
        "503":
          description: Service temporarily unavailable, please try again later.
          schema:
            $ref: "#/definitions/ErrorResponse"

definitions:
  ### ConfigStatus Definitions
  ConfigStatusParams:
    title: ConfigStatusParams
    type: object
    additionalProperties: true
    properties:
      id:
        type: string
        description: "Configuration Object ID.  For Example: ID for either Deployment, Proxy or Policy object"
        example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"
      configpack_id:
        type: string
        description: "API Gateway Configuration ID"
        example: "123456789"
      status:
        type: string
        description: "Current Status for deployed API Gateway Configuration"
        example: "Inprogress"
        enum:
          - "Inprogress"
          - "Failed"
          - "Created"
          - "Applied"
          - "Indraft"
      message:
        type: string

  applyConfigOnApiGwResponse:
    title: applyConfigOnApiGwResponse
    type: object
    properties:
      configstatus:
        $ref: "#/definitions/ConfigStatusParams"

  undeployConfigOnApiGwResponse:
    title: applyConfigOnApiGwResponse
    type: object
    properties:
      configstatus:
        $ref: "#/definitions/ConfigStatusParams"

  getConfigStatusResponse:
    title: getConfigStatusResponse
    type: object
    properties:
      configstatus:
        $ref: "#/definitions/ConfigStatusParams"

  ### UpstreamService Definitions
  BackendServer:
    title: BackendServer
    type: object
    properties:
      ip4_addr:
        type: string
        description: "IPv4 host address for the Upstream Server/Service where API traffic will be sent"
        format: ipv4
        example: 10.2.2.20
      ip6_addr:
        type: string
        description: "IPv6 host address for the Upstream Server/Service where API traffic will be sent"
        format: ipv6
        example: 2001:0db8:5b96:0000:0000:426f:8e17:642a
      port:
        type: integer
        description: "Port number for Upstream Server/Service"
        minimum: 1
        maximum: 65535
        example: 443

  CertKeyObject:
    title: CertKeyObject
    type: object
    additionalProperties: true
    required:
      - filename
      - contents
    properties:
      filename:
        type: string
        description: "File name of the Certificate or Key."
      contents:
        type: string
        format: byte
        description: "base64 encoded tls certificate"
      ssl_inform:
        type: string
        description: "Input format of the Certificate or Key file. NOTE: Only PEM format is supported."
        enum:
          - PEM
          - PFX
        default: "PEM"
      encoding:
        description: "File encoding"
        type: string
        enum:
          - BASE64
        default: "BASE64"

  UpstreamServiceParams:
    title: UpstreamService Base Parameters
    type: object
    additionalProperties: true
    required:
      - name
    properties:
      name:
        type: string
        description: "Upstream Service Name"
        example: "billing_service"
      service_fqdn:
        type: string
        description: "Hostname of Upstream Service as FQDN where API traffic will be sent"
        example: "petstoreapi.example.com"
      service_fqdn_port:
        type: integer
        example: 443
        minimum: 1
        maximum: 65535
        description: "Optional Listening port for Service FQDN"
      scheme:
        type: string
        description: "Protocol used to exchange data with the service"
        enum:
          - http
          - https
      backend_servers:
        type: array
        description: "List of all IPv4 or IPv6 host address and Port for Upstream Service."
        items:
          $ref: "#/definitions/BackendServer"

  UpstreamServiceParamsWithId:
    title: UpstreamServiceParamsWithId
    required:
      - id
    allOf:
      - $ref: "#/definitions/UpstreamServiceParams"
      - properties:
          id:
            type: "string"
            description: "Upstream service ID"
            example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"

  UpstreamServiceResponseParams:
    title: UpstreamServiceResponseParams
    required:
      - "id"
    allOf:
      - properties:
          createdAt:
            description: "Creation timestamp for Upstream Service"
            type: "string"
          updatedAt:
            description: "Last Update timestamp for Upstream Service"
            type: "string"
      - $ref: "#/definitions/UpstreamServiceParamsWithId"

  UpstreamServiceSummaryObject:
    title: UpstreamServiceSummaryObject
    type: object
    properties:
      api_id:
        type: string
        description: "API Definition ID"
        example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"
      dep_id:
        type: string
        description: "API Deployment ID"
        example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"
      name:
        type: string
        description: "Upstream Service Name"
        example: "billing_service"

  UpstreamServiceSummaryObjectWithId:
    title: UpstreamServiceSummaryObjectWithId
    required:
      - id
    allOf:
      - $ref: "#/definitions/UpstreamServiceSummaryObject"
      - properties:
          id:
            type: "string"
            description: "Upstream service ID"
            example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"
          createdAt:
            type: "string"
            description: "Creation timestamp for Upstream Service"
          updatedAt:
            type: "string"
            description: "Last Update timestamp for Upstream Service"

  getUpstreamServiceResponse:
    title: getUpstreamServiceResponse
    type: object
    properties:
      upstreamservice:
        $ref: "#/definitions/UpstreamServiceResponseParams"

  modifyUpstreamServiceRequest:
    title: modifyUpstreamServiceRequest
    type: object
    properties:
      upstreamservice:
        $ref: "#/definitions/UpstreamServiceParamsWithId"

  modifyUpstreamServiceResponse:
    title: modifyUpstreamServiceResponse
    type: object
    properties:
      upstreamservice:
        $ref: "#/definitions/UpstreamServiceResponseParams"

  listAllUpstreamServicesWithIdResponse:
    title: listAllUpstreamServicesWithIdResponse
    type: object
    properties:
      upstreamservices:
        type: array
        description: "List of Upstream Service"
        items:
          $ref: "#/definitions/UpstreamServiceSummaryObjectWithId"

  addUpstreamServiceRequest:
    title: addUpstreamServiceRequest
    type: object
    properties:
      upstreamservice:
        $ref: "#/definitions/UpstreamServiceParams"

  addUpstreamServiceResponse:
    title: addUpstreamServiceResponse
    type: object
    properties:
      upstreamservice:
        $ref: "#/definitions/UpstreamServiceResponseParams"

  ### Routes Definitions
  APIRouteParams:
    title: APIRoute Base Parameters
    type: object
    additionalProperties: true
    required:
      - route_param
      - upstreamservice_name
    properties:
      name:
        type: string
        description: "Name for API Route."
        example: "billing_traffic"
      route_paramtype:
        type: string
        description: "API Route Param type"
        example: "resource_path"
        enum:
          - "resource_path"
          - "header_name"
          - "http_method"
      route_param:
        type: string
        description: "API Resource Path in the API definition or user entered Path. NOTE: Resource Path works as 'Prefix' match. Example: Selecting /pet will match any traffic with URI path /pet as well as /pet/findByStatus."
        example: "/billing"
      upstreamservice_name:
        type: string
        description: "Upstream Service Name where API traffic will be sent"
        example: "billing_service"

  APIRouteParamsWithId:
    title: APIRouteParamsWithId
    required:
      - id
    allOf:
      - $ref: "#/definitions/APIRouteParams"
      - properties:
          id:
            type: "string"
            description: "API Route ID"
            example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"

  APIRouteResponseParams:
    title: APIRouteResponseParams
    required:
      - "id"
    allOf:
      - properties:
          createdAt:
            type: "string"
            description: "Creation timestamp for API Route"
          updatedAt:
            type: "string"
            description: "Last update timestamp for API Route"
      - $ref: "#/definitions/APIRouteParamsWithId"

  APIRouteSummaryObject:
    title: APIRouteSummaryObject
    type: object
    properties:
      api_id:
        type: string
        description: "API definition ID"
        example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"
      dep_id:
        type: string
        description: "API Deployment ID"
        example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"
      route_param:
        type: string
        description: "API Resource endpoints"
        example: "/billing"
      upstreamservice_name:
        type: string
        description: "Upstream Service Name"
        example: "billing_service"

  APIRouteSummaryObjectWithId:
    title: APIRouteSummaryObjectWithId
    required:
      - id
    allOf:
      - $ref: "#/definitions/APIRouteSummaryObject"
      - properties:
          id:
            type: "string"
            description: "API Route ID"
            example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"
          createdAt:
            type: "string"
            description: "Creation timestamp for API Route"
          updatedAt:
            type: "string"
            description: "Last updated timestamp for API Route"

  getAPIRouteResponse:
    title: getAPIRouteResponse
    type: object
    properties:
      route:
        $ref: "#/definitions/APIRouteResponseParams"

  listAllAPIRoutesWithIdResponse:
    title: listAllAPIRoutesWithIdResponse
    type: object
    properties:
      routes:
        type: array
        description: "List of all API Routes for a given API Deployment ID"
        items:
          $ref: "#/definitions/APIRouteSummaryObjectWithId"

  addAPIRouteRequest:
    title: addAPIRouteRequest
    type: object
    properties:
      route:
        $ref: "#/definitions/APIRouteParams"

  addAPIRouteResponse:
    title: addAPIRouteResponse
    type: object
    properties:
      route:
        $ref: "#/definitions/APIRouteResponseParams"

  ### Policies Definitions
  APIPolicyConfigSpec:
    type: object
    required:
      - policytype
      - config_spec
      - order_index
    properties:
      policytype:
        type: string
        description: "Type for API Policy."
        example: "Ratelimit"
        enum:
          - "Ratelimit"
          - "JWT Auth Validation"
          - "BasicAuth"
          - "WebAuth"
          - "NoAuth"
          - "OAuth"
          - "IP Whitelist"
          - "Bot"
          - "WAF"
          - "Header Rewrite"
          - "URI Path Rewrite"
          - "Authorization"
          - "Deny"
      policy_name:
        type: string
        description: "API Policy name"
      order_index:
        type: integer
        format: int32
        description: "Order in which to apply API Policy"
        minimum: 1
        maximum: 256
      config_spec:
        type: object
        description: "JSON dictionary of configuration parameters and values as required for the selected API Policy type. Please refer to the document for details on config_spec JSON schema for different API policy types. Document reference: https://docs.citrix.com/en-us/citrix-application-delivery-management-service/api-gateway/add-policies.html"

  APIPolicyParams:
    title: APIPolicy Base Parameters
    type: object
    required:
      - policygroup_name
      - upstreamservice_id
      - requestpath
    properties:
      policygroup_name:
        type: string
        description: "API Policy Group Name"
        example: "billing_traffic"
      upstreamservice_id:
        type: string
        description: "Upstream Service ID in the API Deployment"
        example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"
      requestpath:
        type: array
        description: "List of API Policy with corresponding JSON configuration to be applied on Request Path"
        items:
          $ref: "#/definitions/APIPolicyConfigSpec"
        minItems: 1
        maxItems: 256
      responsepath:
        type: array
        description: "List of API Policy with corresponding JSON configuration to be applied on Response Path"
        items:
          $ref: "#/definitions/APIPolicyConfigSpec"
        minItems: 0
        maxItems: 256

  APIPolicyParamsWithId:
    title: APIPolicyParamsWithId
    required:
      - id
    allOf:
      - $ref: "#/definitions/APIPolicyParams"
      - properties:
          id:
            type: "string"
            description: "API Policy ID"
            example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"

  APIPolicyResponseParams:
    title: APIPolicyResponseParams
    required:
      - "id"
    allOf:
      - properties:
          createdAt:
            type: "string"
            description: "Creation timestamp for API Policies"
          updatedAt:
            type: "string"
            description: "Last update timestamp for API Policies"
          deployedAt:
            type: "string"
            description: "Latest deployed timestamp for API Policies"
      - $ref: "#/definitions/APIPolicyParamsWithId"

  APIPolicySummaryObject:
    title: APIPolicySummaryObject
    type: object
    properties:
      api_id:
        type: string
        description: "API definition ID"
        example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"
      dep_id:
        type: string
        description: "API Deployment ID"
        example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"
      route_param:
        type: string
        description: "API Resource Path."
        example: "/billing"
      upstreamservice_name:
        type: string
        description: "Upstream Service Name"
        example: "billing_service"
      policygroup_name:
        type: string
        description: "API Policy Group Name"
        example: "billing_traffic"

  APIPolicySummaryObjectWithId:
    title: APIPolicySummaryObjectWithId
    required:
      - id
    allOf:
      - $ref: "#/definitions/APIPolicySummaryObject"
      - properties:
          id:
            type: "string"
            description: "API Policy ID"
            example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"
          createdAt:
            type: "string"
            description: "Creation timestamp for API Policy"
          updatedAt:
            type: "string"
            description: "Last update timestamp for API Policy"
          deployedAt:
            type: "string"
            description: "Latest deployed timestamp for API Policy"

  getAPIPolicyResponse:
    title: getAPIPolicyResponse
    type: object
    properties:
      policy:
        $ref: "#/definitions/APIPolicyResponseParams"

  listAllAPIPoliciesWithIdResponse:
    title: listAllAPIPoliciesWithIdResponse
    type: object
    properties:
      policies:
        type: array
        description: "List of all API Policies for provided API Deployment ID"
        items:
          $ref: "#/definitions/APIPolicySummaryObjectWithId"

  addAPIPolicyRequest:
    title: addAPIPolicyRequest
    type: object
    properties:
      policy:
        $ref: "#/definitions/APIPolicyParams"

  addAPIPolicyResponse:
    title: addAPIPolicyResponse
    type: object
    properties:
      policy:
        $ref: "#/definitions/APIPolicyResponseParams"

  modifyAPIPolicyRequest:
    title: modifyAPIPolicyRequest
    type: object
    properties:
      policy:
        $ref: "#/definitions/APIPolicyParamsWithId"

  modifyAPIPolicyResponse:
    title: modifyAPIPolicyResponse
    type: object
    properties:
      policy:
        $ref: "#/definitions/APIPolicyResponseParams"

  ApiDeploymentParams:
    title: ApiDeployment Base Parameters
    type: object
    additionalProperties: true
    required:
      - api_id
      - name
      - target_apigw
    properties:
      api_id:
        type: string
        description: "API Definition ID"
        example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"
      name:
        type: string
        description: "API Deployment Name"
        example: "production_eastcoast"
      target_apigw:
        type: string
        description: "Details of Target ADC instance acting as API Gateway.\nPlease refer to the ADM Service \"Configuration APIs for Instances\" - \"ns\" resource.\nTo fetch these details use API: \"https://adm.cloud.com/massvc/{customerid}/nitro/v2/config/ns?filter=type:/^ns$|nsvpx$|cpx|nsap/,ha_master_state:/Primary|^$/,instance_state:Up,license:Platinum\"\nNote: API Gateway requires Premium license on ADC."
        example: '{"id":"8c97b9d3-e8e4-4486-9a94-a51fca2e6048"}'
      tags:
        type: array
        items:
          type: string
          example: "Sandbox"
      apiproxy_ref:
        $ref: "#/definitions/ApiproxyObjectRef"
      service_fqdn_suffix:
        type: string
        description: Service FQDN suffix is a string appended to the base URL (service_fqdn) of the API proxy as URL path segment before the API resource paths. Its used for routing the api traffic received on api proxy towards the specific API deployment. For e.g., string 'sharefile' configured as service_fqdn_suffix on api proxy with service_fqdn of 'api.example.com' will result in base service URL of "https://api.example.com/sharefile". The string has to be unique for each API deployment created on the API proxy.
        example: "sharefile"

  ApiproxyObjectRef:
    title: API Proxy Reference
    type: object
    additionalProperties: true
    properties:
      id:
        type: string
        description: "API proxy ID"
        example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"

  ApiDeploymentParamsWithId:
    title: ApiDeploymentParamsWithId
    required:
      - api_id
    allOf:
      - $ref: "#/definitions/ApiDeploymentParams"
      - properties:
          id:
            type: "string"
            description: "API Deployment ID"
            example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"


  ### APIProxy Definitions
  AddApiProxyRequest:
    title: addApiProxyRequest
    type: object
    properties:
      apiproxy:
        $ref: "#/definitions/ApiProxyParams"
      target_apigw:
        $ref: "#/definitions/TargetGw"

  AddApiProxyResponse:
    title: addApiProxyResponse
    type: object
    properties:
      apiproxy:
        $ref: "#/definitions/ApiProxyResponseParamsWithId"
      target_apigw:
        $ref: "#/definitions/TargetGw"

  modifyApiProxyRequest:
    title: modifyApiProxyRequest
    type: object
    properties:
      apiproxy:
        $ref: "#/definitions/ApiProxyParams"
      target_apigw:
        $ref: "#/definitions/TargetGw"


  modifyApiProxyResponse:
    title: modifyApiProxyResponse
    type: object
    properties:
      apiproxy:
        $ref: "#/definitions/ApiProxyResponseParamsWithId"
      target_apigw:
        $ref: "#/definitions/TargetGw"

  listApiProxiesWithIdResponse:
    title: List ApiProxiesWithIdResponse
    type: object
    properties:
      apiproxies:
        type: array
        items:
          $ref: "#/definitions/ApiProxySummaryObjectWithId"

  ApiProxySummaryObjectWithId:
    title: ApiProxySummaryObjectWithId
    type: object
    required:
      - id
    allOf:
      - $ref: "#/definitions/ApiProxySummaryObject"
      - properties:
          id:
            type: string
            description: "API Proxy ID"
            example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"
          createdAt:
            type: "string"
            description: "Creation timestamp for API Proxy"
          updatedAt:
            type: "string"
            description: "Last update timestamp for API Proxy"
          deployedAt:
            type: "string"
            description: "Latest deploy timestamp for API Proxy"

  ApiProxySummaryObject:
    title: ApiProxySummaryObject
    type: object
    properties:
      proxy_name:
        type: string
        description: "API Proxy name"
        example: "petstore_proxy"
      tls_certkey_objref:
        $ref: "#/definitions/ADMCertkeyObjectRef"
      target_apigw:
        $ref: "#/definitions/TargetGw"

  getApiProxyResponse:
    title: getApiProxyResponse
    type: object
    properties:
      apiproxy:
        $ref: "#/definitions/ApiProxyParamsWithId"
      target_apigw:
        $ref: "#/definitions/TargetGw"

  ApiProxyResponseParamsWithId:
    title: ApiProxyResponseParams
    required:
      - "id"
    allOf:
      - properties:
          createdAt:
            type: "string"
          updatedAt:
            type: "string"
          deployedAt:
            type: "string"
      - $ref: "#/definitions/ApiProxyParamsWithId"


  ApiProxyParamsWithId:
    title: ApiProxyParamsWithId
    required:
      - id
    allOf:
      - $ref: "#/definitions/ApiProxyParams"
      - properties:
          id:
            type: "string"
            example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"


  ApiProxyParams:
    title: ApiProxy Base Parameters
    type: object
    additionalProperties: true
    required:
      - host
    properties:
      proxy_name:
        type: string
        description: "API Proxy name"
        example: "petstore_proxy"
      host:
        type: string
        description: "Hostname or IP address (Citrix ADC VIP) where API traffic is received by Citrix ADC from API clients. This VIP need not exist and will be created on Citrix ADC.\nYou may input IP address or use IPAM to auto select and configure from available range.\nTo use IPAM, provide ipam-name as JSON string.\n\tExample: {\"ipam-name\": \"example_ipam_name\"}. To use IP address, use dot formatted string.\n\tExample: \"10.2.2.20\"."
        example: "petstoreapi.example.com"
      port:
        type: integer
        description: "API Proxy Port number"
        example: 443
        minimum: 1
        maximum: 65535
      protocol:
        type: string
        enum:
        - 'http'
        - 'https'
      service_fqdns:
        type: array
        description: "Service FQDNs where API traffic will be received from api clients"
        items:
          type: string
          example: "api.example.com"
      tls_cert:
        $ref: "#/definitions/CertKeyObject"
      tls_certkey:
        $ref: "#/definitions/CertKeyObject"
      tls_security_profile:
        description: "TLS Security profile"
        type: "string"
        enum:
          - "High Security"
          - "Medium Security"
      tls_certkey_objref:
        $ref: "#/definitions/ADMCertkeyObjectRef"

  ApiDeploymentResponseParams:
    title: ApiDeploymentResponseParams
    required:
      - "id"
    allOf:
      - properties:
          createdAt:
            type: "string"
          updatedAt:
            type: "string"
          deployedAt:
            type: "string"
      - $ref: "#/definitions/ApiDeploymentParamsWithId"
      - $ref: "#/definitions/ApiProxyParams"
      - $ref: "#/definitions/listAllUpstreamServicesWithIdResponse"
      - $ref: "#/definitions/listAllAPIRoutesWithIdResponse"

  ApiDeploymentSummaryObject:
    title: ApiDeploymentSummaryObject
    type: object
    properties:
      api_id:
        type: string
        description: "API definition ID"
        example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"
      name:
        type: string
        description: "Name of the Deployment instance for the selected API definition."
        example: "production_eastcoast"
      proxy_name:
        type: string
        description: "proxy name"
        example: "petstore_proxy"
      target_apigw:
        description: "Target ADC instance acting as API GW"
        type: "string"
        example: '{"id":"8c97b9d3-e8e4-4486-9a94-a51fca2e6048"}'
      host:
        type: string
        description: "Hostname or IP address (Citrix ADC VIP) where API traffic is received by Citrix ADC from API clients."
        example: "petstoreapi.example.com"

  ApiDeploymentSummaryObjectWithId:
    title: ApiDeploymentSummaryObjectWithId
    required:
      - id
    allOf:
      - $ref: "#/definitions/ApiDeploymentSummaryObject"
      - properties:
          id:
            type: "string"
            description: "API Deployment ID."
            example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"
          createdAt:
            type: "string"
            description: "Creation timestamp for API Deployment"
          updatedAt:
            type: "string"
            description: "Last update timestamp for API Deployment"
          deployedAt:
            type: "string"
            description: "Latest deploy timestamp for API Deployment"

  getApiDeploymentResponse:
    title: getApiDeploymentResponse
    type: object
    properties:
      deployment:
        $ref: "#/definitions/ApiDeploymentParamsWithId"
      proxy:
        $ref: "#/definitions/ApiProxyParams"


  ## Operations
  listApiDeploymentsWithIdResponse:
    title: listApiDeploymentsWithIdResponse
    type: object
    properties:
      deployments:
        type: array
        description: "List of all API Deployments"
        items:
          $ref: "#/definitions/ApiDeploymentSummaryObjectWithId"

  deployApiInstanceOnApiGwRequest:
    title: deployApiInstanceOnApiGwRequest
    type: object
    properties:
      deployment:
        $ref: "#/definitions/ApiDeploymentParams"
      proxy:
        $ref: "#/definitions/ApiProxyParams"
      upstreamservices:
        type: array
        description: "List of all Upstream Service"
        items:
          $ref: "#/definitions/UpstreamServiceParams"
      routes:
        type: array
        description: "List of all API Routes"
        items:
          $ref: "#/definitions/APIRouteParams"

  deployApiInstanceOnApiGwResponse:
    title: deployApiInstanceOnApiGwResponse
    type: object
    properties:
      deployment:
        $ref: "#/definitions/ApiDeploymentResponseParams"

  modifyApiDeploymentRequest:
    title: modifyApiDeploymentRequest
    type: object
    properties:
      deployment:
        $ref: "#/definitions/ApiDeploymentParamsWithId"
      proxy:
        $ref: "#/definitions/ApiProxyParams"

  modifyApiDeploymentResponse:
    title: modifyApiDeploymentResponse
    type: object
    properties:
      deployment:
        $ref: "#/definitions/ApiDeploymentParamsWithId"
      proxy:
        $ref: "#/definitions/ApiProxyParams"

  ## API Definitions
  ApiDefinitionParams:
    title: ApiDefinition Base Parameters
    type: object
    required:
      - title
      - version
      - host
      - apiresources
    properties:
      name:
        type: string
        description: "API Definition name"
        example: "petstore_api"
      title:
        type: string
        description: "Title for your API's E.g. Petstore API"
        example: "My Petstore API"
      version:
        type: string
        description: "API version string"
        example: "v1"
      spec_version:
        type: string
        description: "OAS specification version."
        example: "swagger: 2.0"
        default: "swagger: 2.0"
      host:
        type: string
        description: "Host FQDN where API service is hosted"
        example: "myapi.example.com"
      basepath:
        type: "string"
        description: "API Definition base path - this is appended as prefix to all API resources"
        example: "/petstore"
      apiresources:
        type: array
        required:
          - paths
        description: "List of HTTP Methods and API Resource paths."
        items:
          properties:
            paths:
              type: string
              example: "/products"
            methods:
              type: array
              items:
                type: string
                enum:
                  - "GET"
                  - "PUT"
                  - "POST"
                  - "DELETE"
                  - "PATCH"
              minItems: 0
              maxItems: 5

  ApiDefinitionParamsWithId:
    title: ApiDefinitionParamsWithId
    required:
      - id
    allOf:
      - $ref: "#/definitions/ApiDefinitionParams"
      - properties:
          id:
            type: "string"
            description: "API Definition ID"
            example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"

  ApiDefinitionResponseParams:
    title: ApiDefinition Response Parameters
    required:
      - "id"
    allOf:
      - properties:
          createdAt:
            type: "string"
            description: "Creation timestamp for API Definition"
          updatedAt:
            type: "string"
            description: "Last update timestamp for API Definition"
      - $ref: "#/definitions/ApiDefinitionParamsWithId"

  addApiDefinitionRequest:
    title: Add ApiDefinition With Parameters in Request Body
    type: object
    properties:
      apidef:
        $ref: "#/definitions/ApiDefinitionParams"
      spec_ref:
        description: "API specification information reference"
        type: string
        example: '{"spec_id":"8c97b9d3-e8e4-4486-9a94-a51fca2e6048", "name":"petstore.yaml"}'

  addApiDefinitionResponse:
    title: Add ApiDefinition - Response Body
    type: object
    properties:
      apidef:
        $ref: "#/definitions/ApiDefinitionResponseParams"
      spec_ref:
        description: "API specification information reference"
        type: string
        example: '{"spec_id":"8c97b9d3-e8e4-4486-9a94-a51fca2e6048", "name":"petstore.yaml"}'

  ApiDefinitionSummaryObject:
    title: ApiDefinitionsSummaryObject
    type: object
    properties:
      name:
        type: string
        description: "API Definition name"
        example: "petstore_api"
      title:
        type: string
        description: "Title for API Definition"
        example: "My Petstore API"
      version:
        type: string
        description: "API Definition version"
        example: "v1"
      host:
        type: string
        description: "Host FQDN where API service is hosted"
        example: "myapi.example.com"

  ApiDefinitionSummaryObjectWithId:
    title: ApiDefinitionSummaryObjectWithId
    required:
      - id
    allOf:
      - $ref: "#/definitions/ApiDefinitionSummaryObject"
      - properties:
          id:
            type: "string"
            description: "API Definition ID"
            example: "8c97b9d3-e8e4-4486-9a94-a51fca2e6048"
          spec_id:
            type: "string"
            description: "API Specification Id associated"
            example: "db87ab1d-b9fd-4708-b63c-58bf43dce9a2"
          createdAt:
            type: "string"
            description: "Creation timestamp for API Definitions"
          updatedAt:
            type: "string"
            description: "Last update timestamp for API Definitions"

  listApiDefinitionsWithIdResponse:
    title: listApiDefinitionsWithIdResponse
    type: object
    properties:
      apidefs:
        type: array
        description: "List of all API Definitions"
        items:
          $ref: "#/definitions/ApiDefinitionSummaryObjectWithId"

  getApiDefinitionResponse:
    title: getApiDefinitionResponse
    type: object
    properties:
      apidef:
        $ref: "#/definitions/ApiDefinitionParamsWithId"
      spec_ref:
        description: "API specification information reference"
        type: string
        example: '{"spec_id":"8c97b9d3-e8e4-4486-9a94-a51fca2e6048", "name":"petstore.yaml"}'

  modifyApiDefinitionRequest:
    title: modifyApiDefinitionRequest
    type: object
    properties:
      apidef:
        $ref: "#/definitions/ApiDefinitionParamsWithId"
      spec_ref:
        description: "API specification information reference"
        type: string
        example: '{"spec_id":"8c97b9d3-e8e4-4486-9a94-a51fca2e6048", "name":"petstore.yaml"}'

  modifyApiDefinitionResponse:
    title: modifyApiDefinitionResponse
    type: object
    properties:
      apidef:
        $ref: "#/definitions/ApiDefinitionResponseParams"
      spec_ref:
        description: "API specification information reference"
        type: string
        example: '{"spec_id":"8c97b9d3-e8e4-4486-9a94-a51fca2e6048", "name":"petstore.yaml"}'

  ### Other Common Definitions
  ADMCertkeyObjectRef:
    title: CertKeyObjRef
    type: object
    properties:
      adm_certkey:
        description: "Reference to existing TLS certkey object in ADM"
        type: "string"
        example: '{"id":"8c97b9d3-e8e4-4486-9a94-a51fca2e6048"}'

  TargetGw:
    title: TargetGW
    type: object
    properties:
     target_device:
        description: "Target ADC instance acting as API GW"
        type: "string"
        example: '{"id":"8c97b9d3-e8e4-4486-9a94-a51fca2e6048"}'

  ErrorResponse:
    properties:
      errorcode:
        type: integer
        example: 200242
      errormessage:
        type: string
        example: Error occured while processing the request
