swagger: '2.0'
info:
  version: ADM 13.0
  title: ADM StyleBooks APIs
  description: StyleBooks REST APIs
host: 'adm.cloud.com'
#basePath: /stylebook/nitro/v1/config
schemes:
  #- http
  - https
consumes:
  - application/json
produces:
  - application/json
parameters:
  authHeaderParam:
    in: header
    name: Authorization
    type: string
    required: true
    description: Session ID for authentication.Should 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
  namespaceParam:
    name: namespace
    in: path
    type: string
    description: namespace of the StyleBook.
    required: true
  versionParam:
    name: version
    in: path
    type: string
    description: version of the StyleBook.
    required: true
  nameParam:
    name: name
    in: path
    type: string
    description: name of the StyleBook.
    required: true
  configpackIDParam:
    name: configpack-id
    in: path
    type: string
    description: ConfigPack ID.
    required: true
  resourceParam:
    name: resource
    in: path
    type: string
    description: Resource represents stylebooks/configpacks.
    required: true
  resourceIDParam:
    name: resource-id
    in: path
    type: string
    description: Unique ID of the resource.
    required: true
  dataSourceIdParam:
    name: datasource-id
    in: path
    type: string
    description: Data Source ID.
    required: true
  dataSourceCollectionTypeNameParam:
    name: collection-type-name
    in: path
    type: string
    description: Data Source collection type name.
    required: true
  dataSourceTypeIdParam:
    name: datasource-type-id
    in: path
    type: string
    description: Data Source type ID.
    required: true
  collectionTypeIdParam:
    name: collection-type-id
    in: path
    type: string
    description: Data Source collection type ID.
    required: true
  collectionIdParam:
    name: collection-id
    in: path
    type: string
    description: Data Source collection ID.
    required: true
  labelNameParam:
    name: tag-name
    in: path
    type: string
    description: Label name
    required: true
  DataSourceIdParam:
    name: datasource-id
    in: path
    type: string
    description: Data Source ID.
    required: true
  DataSourceCollectionNameParam:
    name: collection-name
    in: path
    type: string
    description: Data Source collection name
    required: true
  repositoryNameParam:
    name: repository-name
    in: path
    type: string
    description: Repository name
    required: true
  customerid:
    in: path
    name: customerid
    type: string
    required: true
    description: Customer ID of the user.
  modeOfMethod:
    name: mode
    in: query
    type: string
    description: Mode of the method can be dry_run, async or sync.
    required: false
  ConfigPackId:
    name: configpackid
    in: query
    type: string
    description: ConfigPack ID.
    required: false
  pageNo:
    name: pageno
    in: query
    type: number
    description: Page number to be fetched for the request.
    required: false
  pageSize:
    name: pagesize
    in: query
    type: number
    description: Page size to be fetched for the request
    required: false
  forceOperation:
    name: force
    in: query
    type: boolean
    description: Process the request despite any exceptions.
    required: false
  countResponse:
    name: count
    in: query
    type: boolean
    description: Retrieves count of the objects in the response.
    required: false
  bestEffort:
    name: best_effort
    in: query
    type: boolean
    description: Ensure that the request is served on best_effort service.
    required: false
  skipSaveOnTargets:
    name: skip_save_on_targets
    in: query
    type: boolean
    description: Skip saving the configuration in ns conf of the ADC instance.
    required: false
  dependencies:
    name: dependencies
    in: query
    type: string
    description: Get the dependencies of a stylebook being retrieved.
    required: false
  status:
    name: status
    in: query
    type: string
    description: Status of a configpack that is being returned.
    required: false
paths:
  /massvc/{customerid}/stylebook/nitro/v1/config/stylebooks:
    get:
      description: Retrieves description of all StyleBooks in the system.
      operationId: GetAllStylebooks
      produces:
        - application/json
      tags:
        - stylebooks
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      responses:
        '200':
          description: Successful retrieval of all StyleBooks in the .
          schema:
            $ref: '#/definitions/GetAllStyleBooksResponseBody'
    post:
      description: Uploads (Imports) a new StyleBook.
      operationId: ImportStylebook
      produces:
        - application/json
      tags:
        - stylebooks
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/ImportStyleBookRequestBody'
      responses:
        '200':
          description: Successful creation of a ConfigPack.
          schema:
            $ref: '#/definitions/ImportStyleBookResponseBody'
  /massvc/{customerid}/stylebook/nitro/v1/config/stylebooks/actions/validate:
    post:
      description: Validates the contents of a StyleBook.
      operationId: ValidateStylebook
      produces:
        - application/json
      tags:
        - actions
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/ValidateStyleBookRequestBody'
      responses:
        '200':
          description: Valid StyleBook
          schema:
            $ref: '#/definitions/ValidateStyleBookResponseBody'
  '/massvc/{customerid}/stylebook/nitro/v1/config/configpacks/actions/upgrade':
    post:
      description: Upgrade the list of Configpacks from current StyleBook to another StyleBook.
      operationId: UpgradeConfigpacks
      produces:
        - application/json
      tags:
        - actions
      parameters:
        - $ref: '#/parameters/customerid'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/UpgradeConfigpacksListRequestBody'
      responses:
        '200':
          description: Successful creation of a ConfigPack
          schema:
            $ref: '#/definitions/ValidConfigPackChangeResponseBody'
  '/massvc/{customerid}/stylebook/nitro/v1/config/stylebooks/namespaces':
    get:
      description: Retrieves distinct Namespaces of all StyleBooks in the system.
      operationId: GetDistinctNamespacesStylebooks
      produces:
        - application/json
      tags:
        - stylebooks
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      responses:
        '200':
          description: Successful retrieval of all distinct Namespaces of StyleBooks in the system.
          schema:
            $ref: '#/definitions/GetDistinctNamespacesStyleBooksResponseBody'
  '/massvc/{customerid}/stylebook/nitro/v1/config/stylebooks/namespaces/{namespace}':
    get:
      description: Retrieves all StyleBooks belonging to the required namespace in the system.
      operationId: GetStylebooksofNamespace
      parameters:
        - $ref: '#/parameters/namespaceParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - stylebooks
      responses:
        '200':
          description: Successful retrieval of all StyleBooks belonging to the required namespace in the system.
          schema:
            $ref: '#/definitions/GetStylebooksofNamespaceResponseBody'
  '/massvc/{customerid}/stylebook/nitro/v1/config/stylebooks/versions':
    get:
      description: Retrieves distinct Versions of all StyleBooks in the system.
      operationId: GetDistinctVersionsStylebooks
      produces:
        - application/json
      tags:
        - stylebooks
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      responses:
        '200':
          description: Successful retrieval of all distinct Versions of StyleBooks in the system.
          schema:
            $ref: '#/definitions/GetDistinctVersionsStyleBooksResponseBody'
  '/massvc/{customerid}/stylebook/nitro/v1/config/stylebooks/versions/{version}':
    get:
      description: Retrieves all StyleBooks belonging to the required version in the system.
      operationId: GetStylebooksofVersion
      parameters:
        - $ref: '#/parameters/versionParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - stylebooks
      responses:
        '200':
          description: Successful retrieval of all StyleBooks belonging to the required version in the system.
          schema:
            $ref: '#/definitions/GetStylebooksofVersionResponseBody'
  '/massvc/{customerid}/stylebook/nitro/v1/config/stylebooks/{namespace}/{version}/{name}':
    get:
      description: Retrieve a StyleBook.
      operationId: GetStylebook
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/namespaceParam'
        - $ref: '#/parameters/versionParam'
        - $ref: '#/parameters/nameParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      tags:
        - stylebooks
      responses:
        '200':
          description: Successful retrieval of a StyleBook definition.
          schema:
            $ref: '#/definitions/GetStyleBookResponseBody'
    delete:
      description: >-
        Deletes a StyleBook from the system. Only imported StyleBooks can be
        deleted.
      operationId: DeleteStylebook
      produces:
        - application/json
      tags:
        - stylebooks
      parameters:
        - $ref: '#/parameters/namespaceParam'
        - $ref: '#/parameters/versionParam'
        - $ref: '#/parameters/nameParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      responses:
        '200':
          description: Successful removal of a StyleBook.
          schema:
            $ref: '#/definitions/DeleteStyleBookResponseBody'
  '/massvc/{customerid}/stylebook/nitro/v1/config/stylebooks/{namespace}/{version}/{name}/schema':
    get:
      description: Retrieve the schema for a StyleBook (its Parameters description).
      operationId: GetStylebookSchema
      produces:
        - application/json
      tags:
        - stylebooks
      parameters:
        - $ref: '#/parameters/namespaceParam'
        - $ref: '#/parameters/versionParam'
        - $ref: '#/parameters/nameParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      responses:
        '200':
          description: Successful retrieval of a StyleBook schema.
          schema:
            $ref: '#/definitions/GetStyleBookSchemaResponseBody'
    post:
      description: Retrieve updated schema for a StyleBook based on given parameter values (updated Parameters description)
      operationId: GetStylebooksUpdatedSchema
      produces:
        - application/json
      tags:
        - stylebooks
      parameters:
        - $ref: '#/parameters/namespaceParam'
        - $ref: '#/parameters/versionParam'
        - $ref: '#/parameters/nameParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      responses:
        '200':
          description: Successful retrieval of updated schema for a StyleBook.
          schema:
            $ref: '#/definitions/GetStyleBookSchemaResponseBody'
  '/massvc/{customerid}/stylebook/nitro/v1/config/stylebooks/{namespace}/{version}/{name}/actions/update':
    post:
      description: Update the definition of the current StyleBook.
      operationId: UpdateStyleBook
      produces:
        - application/json
      tags:
        - actions
      parameters:
        - $ref: '#/parameters/namespaceParam'
        - $ref: '#/parameters/versionParam'
        - $ref: '#/parameters/nameParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/ValidateStyleBookRequestBody'
      responses:
        '200':
          description: Successfully Updated StyleBook.
          schema:
            $ref: '#/definitions/UpdateStyleBookResponseBody'
  '/massvc/{customerid}/stylebook/nitro/v1/config/stylebooks/{namespace}/{version}/{name}/configpacks/{configpack-id}/graph':
    get:
      description: Retrieve the objects created for a configpack.
      operationId: GetGraphSchema
      produces:
        - application/json
      tags:
        - configpacks
      parameters:
        - $ref: '#/parameters/namespaceParam'
        - $ref: '#/parameters/versionParam'
        - $ref: '#/parameters/nameParam'
        - $ref: '#/parameters/configpackIDParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      responses:
        '200':
          description: Successful retrieval of a StyleBook schema
          schema:
            $ref: '#/definitions/GetObjectsResponseBody'

  '/massvc/{customerid}/stylebook/nitro/v1/config/stylebooks/{namespace}/{version}/{name}/configpacks':
    get:
      description: Retrieve all Configpacks of a StyleBook.
      operationId: GetConfigpacks
      parameters:
        - $ref: '#/parameters/namespaceParam'
        - $ref: '#/parameters/versionParam'
        - $ref: '#/parameters/nameParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - configpacks
      responses:
        '200':
          description: Retrieve all ConfigPacks of a StyleBook.
          schema:
            $ref: '#/definitions/GetConfigpacksResponseBody'
    post:
      description: Create a ConfigPack from a StyleBook.
      operationId: CreateConfigpack
      produces:
        - application/json
      tags:
        - configpacks
      parameters:
        - $ref: '#/parameters/namespaceParam'
        - $ref: '#/parameters/versionParam'
        - $ref: '#/parameters/nameParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/CreateConfigpackRequestBody'
      responses:
        '200':
          description: Successful creation of a ConfigPack.
          schema:
            $ref: '#/definitions/CreateConfigpackResponseBody'
  '/massvc/{customerid}/stylebook/nitro/v1/config/configpacks/{configpack-id}/actions/upgrade':
    post:
      description: Upgrade the Configpack from current StyleBook to another StyleBook.
      operationId: UpgradeConfigpack
      produces:
        - application/json
      tags:
        - actions
      parameters:
        - $ref: '#/parameters/configpackIDParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/UpgradeConfigpackRequestBody'
      responses:
        '200':
          description: Successful creation of a ConfigPack.
          schema:
            $ref: '#/definitions/UpgradeConfigpackResponseBody'

  '/massvc/{customerid}/stylebook/nitro/v1/config/configpacks/{configpack-id}/actions/detach_targets':
    post:
      summary: "Detach target instances from the configpack to another configpack"
      description: Detach target instances from the configpack to another configpack.
      operationId: DetachTargetFromConfigpack
      produces:
        - application/json
      tags:
        - Configpacks
      parameters:
        - $ref: '#/parameters/configpackIDParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/DetachTargetsRequestBody'
      responses:
        '200':
          description: Detached target instances from the configpack.
          #TODO: Please add a description of a synchronous response payload here
          schema:
            $ref: '#/definitions/DetachTargetsResponseBody'
        '202':
          description: Successful Initiation of a ConfigPack upgrade to a new StyleBook.
          schema:
            $ref: '#/definitions/DetachTargetsResponseBody'

  '/massvc/{customerid}/stylebook/nitro/v1/config/configpacks/actions/import':
    post:
      description: Import the Configpack details as a json file.
      operationId: ImportConfigpack
      produces:
        - application/json
      tags:
        - configpacks
      parameters:
        - $ref: '#/parameters/configpackIDParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/ImportConfigpackRequestBody'
      responses:
        '200':
          description: Successful import of a ConfigPack.
          schema:
            $ref: '#/definitions/CreateConfigpackResponseBody'
        '202':
          description: Successful import of a ConfigPack in async mode.
          schema:
            $ref: '#/definitions/CreateConfigpackResponseBody'

  '/massvc/{customerid}/stylebook/nitro/v1/config/configpacks/{configpack-id}/actions/audit':
    post:
      description: Audit the Configpack for the objects present.
      operationId: AuditConfigpack
      parameters:
        - $ref: '#/parameters/configpackIDParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - actions
      responses:
        '200':
          description: Successful Audit of a ConfigPack.
          schema:
            $ref: '#/definitions/AuditConfigpackResponseBody'

  '/massvc/{customerid}/stylebook/nitro/v1/config/configpacks/{configpack-id}/audit':
    get:
      description: Gets the audit data of Configpack for the objects present.
      operationId: GetAuditConfigpack
      produces:
        - application/json
      tags:
        - configpacks
      parameters:
        - $ref: '#/parameters/configpackIDParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      responses:
        '200':
          description: Successful retrieval of the Audit data of a ConfigPack.
          schema:
            $ref: '#/definitions/GetAuditConfigpackResponseBody'

  '/troubleshooting/{resource}/{resource-id}/actions/collectsupportbundle':
    post:
      description: >-
          Download the resource tarball.
      operationId: ExportSupportResourceBundle
      parameters:
        - $ref: '#/parameters/resourceParam'
        - $ref: '#/parameters/resourceIDParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: false
          x-is-map: false
          schema:
            $ref: '#/definitions/GetExportResourceBundle'
      produces:
        - attachment
      tags:
        - actions
      responses:
        '200':
          description: Successful download of resource bundle.
  '/massvc/{customerid}/stylebook/nitro/v1/config/configpacks':
    get:
      description: Retrieves all ConfigPacks in the system.
      operationId: GetAllConfigpacks
      produces:
        - application/json
      tags:
        - configpacks
      parameters:
        - $ref: '#/parameters/status'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      responses:
        '200':
          description: Retrieve all ConfigPacks of a StyleBook.
          schema:
            $ref: '#/definitions/GetConfigpacksResponseBody'
  '/massvc/{customerid}/stylebook/nitro/v1/config/configpacks/{configpack-id}':
    get:
      description: Retrieve a ConfigPack of a StyleBook.
      operationId: GetConfigpack
      parameters:
        - $ref: '#/parameters/configpackIDParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - configpacks
      responses:
        '200':
          description: Successful retrieval of the Configpack.
          schema:
            $ref: '#/definitions/GetConfigpackResponseBody'

  '/massvc/{customerid}/stylebook/nitro/v1/config/stylebooks/{namespace}/{version}/{name}/configpacks/{configpack-id}':
    get:
      description: Retrieve a ConfigPack of a StyleBook.
      operationId: GetConfigpackWithNameNamespaceVersion
      parameters:
        - $ref: '#/parameters/namespaceParam'
        - $ref: '#/parameters/versionParam'
        - $ref: '#/parameters/nameParam'
        - $ref: '#/parameters/configpackIDParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - configpacks
      responses:
        '200':
          description: Successful retrieval of the Configpack.
          schema:
            $ref: '#/definitions/GetConfigpackResponseBody'
    put:
      description: Update a ConfigPack.
      operationId: UpdateConfigpack
      produces:
        - application/json
      tags:
        - configpacks
      parameters:
        - $ref: '#/parameters/namespaceParam'
        - $ref: '#/parameters/versionParam'
        - $ref: '#/parameters/nameParam'
        - $ref: '#/parameters/configpackIDParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/UpdateConfigpackRequestBody'
      responses:
        '200':
          description: Successful update of a ConfigPack.
          schema:
            $ref: '#/definitions/UpdateConfigpackResponseBody'
    delete:
      description: Delete a ConfigPack.
      operationId: DeleteConfigpack
      produces:
        - application/json
      tags:
        - configpacks
      parameters:
        - $ref: '#/parameters/namespaceParam'
        - $ref: '#/parameters/versionParam'
        - $ref: '#/parameters/nameParam'
        - $ref: '#/parameters/configpackIDParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      responses:
        '200':
          description: Successful removal of a ConfigPack.
          schema:
            $ref: '#/definitions/DeleteConfigpackResponseBody'
  '/massvc/{customerid}/stylebook/nitro/v1/config/stylebooks/{namespace}/{version}/{name}/jobs/{configpack-id}':
    get:
      description: Retrieve the progress of an asynchronous operation on a ConfigPack.
      operationId: GetAsyncJobStatus
      produces:
        - application/json
      tags:
        - jobs
      parameters:
        - $ref: '#/parameters/namespaceParam'
        - $ref: '#/parameters/versionParam'
        - $ref: '#/parameters/nameParam'
        - $ref: '#/parameters/configpackIDParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      responses:
        '202':
          description: Successful retrieval of progress on a ConfigPack operation.
          schema:
            $ref: '#/definitions/GetAsyncJobStatusResponseBody'
  '/massvc/{customerid}/stylebook/nitro/v1/config/jobs/{configpack-id}':
    get:
      description: Retrieves the progress of an asynchronous operation on a ConfigPack.
      operationId: GetJobsAsyncJobStatus
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/configpackIDParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      tags:
        - jobs
      responses:
        '202':
          description: Successful retrieval of progress on a ConfigPack operation.
          schema:
            $ref: '#/definitions/GetAsyncJobStatusResponseBody'

  '/massvc/{customerid}/stylebook/nitro/v1/config/tags':
    get:
      description: >-
          Retrieves all the labels, if any, associated with StyleBooks imported by the user in the ADM GUI.
      operationId: GetLabels
      produces:
        - application/json
      tags:
        - tags
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      responses:
        '200':
          description: Successful retrieval of labels of the StyleBook.
          schema:
            $ref: '#/definitions/GetLabelsResponseBody'

  '/massvc/{customerid}/stylebook/nitro/v1/config/tags/{tag-name}':
    get:
      description: >-
          Retrieves all the labels, if any, associated with StyleBooks imported by the user in the ADM GUI.
      operationId: GetLabelValue
      parameters:
        - $ref: '#/parameters/labelNameParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - tags
      responses:
        '200':
          description: Successful retrieval of labels of the StyleBook.
          schema:
            $ref: '#/definitions/GetLabelValueResponseBody'

  '/massvc/{customerid}/stylebook/nitro/v1/config/stylebooks/{namespace}/{version}/{name}/configpacks/{configpack-id}/tags':
    get:
      description: >-
          Retrieves all the tags, if any, associated with configpack imported by the user in the ADM GUI.
      operationId: GetLabelConfigpackValue
      parameters:
        - $ref: '#/parameters/labelNameParam'
        - $ref: '#/parameters/namespaceParam'
        - $ref: '#/parameters/versionParam'
        - $ref: '#/parameters/nameParam'
        - $ref: '#/parameters/configpackIDParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - tags
      responses:
        '200':
          description: Successful retrieval of labels of the StyleBook
          schema:
            $ref: '#/definitions/CreateConfigLabelBody'
    post:
      description: >-
        Create labels, if any, associated with configpack imported by the user in the ADM GUI.
      operationId: CreateLabel
      parameters:
        - $ref: '#/parameters/labelNameParam'
        - $ref: '#/parameters/namespaceParam'
        - $ref: '#/parameters/versionParam'
        - $ref: '#/parameters/nameParam'
        - $ref: '#/parameters/configpackIDParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - tags
      responses:
        '200':
          description: Successful retrieval of label for the Default configpack.
          schema:
            $ref: '#/definitions/CreateLabelBody'

  '/massvc/{customerid}/stylebook/nitro/v1/config/stylebooks/{namespace}/{version}/{name}/configpacks/{configpack-id}/tags/inherit':
    post:
      description: >-
        Introduce tag inherit configuration data to be associated with configpack imported by the user in the ADM GUI.
      operationId: CreateLabelInheritance
      parameters:
        - $ref: '#/parameters/labelNameParam'
        - $ref: '#/parameters/namespaceParam'
        - $ref: '#/parameters/versionParam'
        - $ref: '#/parameters/nameParam'
        - $ref: '#/parameters/configpackIDParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - tags
      responses:
        '200':
          description: Successful retrieval of the inheritance data for the Default configpack.
          schema:
            $ref: '#/definitions/InheritLabelData'

  '/massvc/{customerid}/stylebook/nitro/v1/config/stylebooks/{namespace}/{version}/{name}/tags':
    get:
      description: >-
          Retrieves all the labels, if any, associated with stylebooks imported by the user in the ADM GUI.
      operationId: GetLabelStylebookValue
      parameters:
        - $ref: '#/parameters/labelNameParam'
        - $ref: '#/parameters/namespaceParam'
        - $ref: '#/parameters/versionParam'
        - $ref: '#/parameters/nameParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - tags
      responses:
        '200':
          description: Successful retrieval of labels of the StyleBook.
          schema:
            $ref: '#/definitions/CreateLabelBody'
    post:
      description: >-
        Create labels, if any, associated with stylebooks imported by the user in the ADM GUI.
      operationId: CreateLabelStylebook
      parameters:
        - $ref: '#/parameters/labelNameParam'
        - $ref: '#/parameters/namespaceParam'
        - $ref: '#/parameters/versionParam'
        - $ref: '#/parameters/nameParam'
        - $ref: '#/parameters/configpackIDParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - tags
      responses:
        '200':
          description: Successful retrieval of label for the StyleBooks.
          schema:
            $ref: '#/definitions/CreateLabelBody'
  '/massvc/{customerid}/stylebook/nitro/v1/config/stylebooks/{namespace}/{version}/{name}/actions/download':
    get:
      description: >-
          Download the StyleBook as tarball.
      operationId: DownloadStyleBook
      parameters:
        - $ref: '#/parameters/namespaceParam'
        - $ref: '#/parameters/versionParam'
        - $ref: '#/parameters/nameParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - attachment
      tags:
        - actions
      responses:
        '200':
          description: Successful download StyleBook.
  '/massvc/{customerid}/stylebook/nitro/v1/config/configpacks/{configpack-id}/actions/export':
    post:
      description: >-
          Download the Configpack as tarball.
      operationId: ExportConfigpack
      parameters:
        - $ref: '#/parameters/configpackIDParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: false
          x-is-map: false
          schema:
            $ref: '#/definitions/GetExportConfig'
      produces:
        - attachment
      tags:
        - actions
      responses:
        '200':
          description: Successful download of Configpack.

  '/massvc/{customerid}/stylebook/nitro/v1/config/system_settings':
    get:
      description: >-
          Retrieves the system settings for the display of default Stylebooks in the ADM GUI.
      operationId: GetSystemSettings
      produces:
        - application/json
      tags:
        - system_settings
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      responses:
        '200':
          description: Successful retrieval of system settings for the default StyleBooks.
          schema:
            $ref: '#/definitions/GetSystemSettings'
    put:
      description: >-
          Modify the system settings for the display of default Stylebooks in the ADM GUI.
      operationId: PutSystemSettings
      produces:
        - application/json
      tags:
        - system_settings
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      responses:
        '200':
          description: Successful retrieval of system settings for the default StyleBooks.
          schema:
            $ref: '#/definitions/PutSystemSettings'

  #--------------------------------------------------- Start of Datasources API -----------------------------------------------------------------------

  /collection_types/{collection-type-name}/schema:
    get:
      description: Retrieves the schema of the given data source collection.
      operationId: GetBuiltinDataSourceSchema
      parameters:
        - $ref: '#/parameters/dataSourceCollectionTypeNameParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - datasources
      responses:
        '200':
          description: Successful retrieval of the attributes of the data source collection.
          schema:
            $ref: '#/definitions/GetDataSourceCollectionSchema'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'

  /massvc/{customerid}/stylebook/nitro/v1/config/datasources/{datasource-id}/collection_types/{collection-type-name}/massvc/{customerid}/stylebook/nitro/v1/config/collections:
    get:
      description: Computes the specified collection data of given data source.
      operationId: ComputeDataSourceCollectionData
      parameters:
        - $ref: '#/parameters/dataSourceIdParam'
        - $ref: '#/parameters/dataSourceCollectionTypeNameParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - datasources
      responses:
        '200':
          description: Successful retrieval of the data of the given data source collection.
          schema:
            $ref: '#/definitions/ComputeDataSourceCollectionDataResponse'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'

  /datasource_types:
    get:
      description: Returns the available list of data source types.
      operationId: GetDatasourceTypeList
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - datasources
      responses:
        '200':
          description: Successful retrieval of the available list of data source types.
          schema:
            $ref: '#/definitions/GetDatasourceTypeResponse'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'
    post:
      description: Adds a new data source type.
      operationId: AddDatasourceType
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/GetIndividualDatasourceType'
      produces:
        - application/json
      tags:
        - datasources
      responses:
        '201':
          description: Successful creation of the given data source type.
          schema:
            $ref: '#/definitions/GetIndividualDatasourceType'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'

  /datasource_types/{datasource-type-id}:
    get:
      description: Returns the given data source type.
      operationId: GetDatasourceTypeResource
      parameters:
        - $ref: '#/parameters/dataSourceTypeIdParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - datasources
      responses:
        '200':
          description: Successful retrieval of the given data source type.
          schema:
            $ref: '#/definitions/GetIndividualDatasourceType'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'
    put:
      description: Updates the current data source type.
      operationId: UpdateDatasourceType
      parameters:
        - $ref: '#/parameters/dataSourceTypeIdParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/GetIndividualDatasourceType'
      produces:
        - application/json
      tags:
        - datasources
      responses:
        '200':
          description: Successful update of the given data source type.
          schema:
            $ref: '#/definitions/GetIndividualDatasourceType'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'
    delete:
      summary: "Delete datasource type present on the ADM with data source type ID as specified in the request"
      description: Delete the datasource type ID.
      operationId: DeleteDtasourceTypeId
      parameters:
        - $ref: '#/parameters/dataSourceTypeIdParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
       - application/json
      tags:
        - datasources
      responses:
        '204':
          description: Successful removal of a data source type.
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'


  /collection_types:
    get:
      description: Returns the available list of collection types.
      operationId: GetCollectionTypeList
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - datasources
      responses:
        '200':
          description: Successful retrieval of the available list of data source collection types.
          schema:
            $ref: '#/definitions/GetCollectionTypeResponse'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'
    post:
      description: Add a new collection type.
      operationId: AddCollectionType
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/GetIndividualCollectionType'
      produces:
        - application/json
      tags:
        - datasources
      responses:
        '201':
          description: Successful creation of the given collection type.
          schema:
            $ref: '#/definitions/GetIndividualCollectionType'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'

  /collection_types/{collection-type-id}:
    get:
      description: Returns the given collection type.
      operationId: GetCollectionTypeResource
      parameters:
        - $ref: '#/parameters/collectionTypeIdParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - datasources
      responses:
        '200':
          description: Successful retrieval of the given data source collection type.
          schema:
            $ref: '#/definitions/GetIndividualCollectionType'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'
    put:
      description: Returns the available list of collection types.
      operationId: UpdateCollectionType
      parameters:
        - $ref: '#/parameters/collectionTypeIdParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/GetIndividualCollectionType'
      produces:
        - application/json
      tags:
        - datasources
      responses:
        '200':
          description: Successful update of the given data source collection type.
          schema:
            $ref: '#/definitions/GetIndividualCollectionType'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'
    delete:
      summary: "Delete data source collection type present on the ADM with data source collection type ID as specified in the request."
      description: Delete the collection type ID.
      operationId: DeleteCollectionTypeId
      parameters:
        - $ref: '#/parameters/collectionTypeIdParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
       - application/json
      tags:
        - datasources
      responses:
        '204':
          description: Successful removal of a data source collection type.
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'


  /massvc/{customerid}/stylebook/nitro/v1/config/datasources:
    get:
      description: Returns the available list of data sources.
      operationId: GetDatasourceList
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - datasources
      responses:
        '200':
          description: Successful retrieval of the available list of data sources.
          schema:
            $ref: '#/definitions/GetDatasourceResponse'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'
    post:
      description: Returns the available list of data sources.
      operationId: AddDatasource
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/GetIndividualDatasource'
      produces:
        - application/json
      tags:
        - datasources
      responses:
        '201':
          description: Successful creation of the given data sources.
          schema:
            $ref: '#/definitions/GetIndividualDatasource'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'

  /massvc/{customerid}/stylebook/nitro/v1/config/datasources/{datasource-id}:
    get:
      description: Returns the given data source.
      operationId: GetDatasource
      parameters:
        - $ref: '#/parameters/dataSourceIdParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - datasources
      responses:
        '200':
          description: Successful retrieval of the given data source.
          schema:
            $ref: '#/definitions/GetIndividualDatasource'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'
    put:
      description: Updates the given data source.
      operationId: UpdateDatasource
      parameters:
        - $ref: '#/parameters/dataSourceIdParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/GetIndividualDatasource'
      produces:
        - application/json
      tags:
        - datasources
      responses:
        '200':
          description: Successful update of the given data source.
          schema:
            $ref: '#/definitions/GetIndividualDatasource'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'
    delete:
      summary: "Delete data source present on the ADM with data source ID as specified in the request."
      description: Delete the data source type ID.
      operationId: DeleteDatasourceId
      parameters:
        - $ref: '#/parameters/dataSourceIdParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
       - application/json
      tags:
        - datasources
      responses:
        '204':
          description: Successful removal of a data sources.
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'

  /massvc/{customerid}/stylebook/nitro/v1/config/collections:
    get:
      description: Returns the available list of collections.
      operationId: GetCollectionList
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - datasources
      responses:
        '200':
          description: Successful retrieval of the available list of data source collections.
          schema:
            $ref: '#/definitions/GetCollectionResponse'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'
    post:
      description: Returns the available list of collections.
      operationId: AddCollection
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/AddIndividualCollection'
      produces:
        - application/json
      tags:
        - datasources
      responses:
        '201':
          description: Successful creation of the given data source collection.
          schema:
            $ref: '#/definitions/GetIndividualCollection'
        '400':
          description: Bad .
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'

  /massvc/{customerid}/stylebook/nitro/v1/config/collections/{collection-id}:
    get:
      description: Returns the given collection.
      operationId: GetCollectionResource
      parameters:
        - $ref: '#/parameters/collectionIdParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - datasources
      responses:
        '200':
          description: Successful retrieval of the given data source collection.
          schema:
            $ref: '#/definitions/GetIndividualCollection'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'
    put:
      description: Returns the available list of collections.
      operationId: UpdateCollection
      parameters:
        - $ref: '#/parameters/collectionIdParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/AddIndividualCollection'
      produces:
        - application/json
      tags:
        - datasources
      responses:
        '200':
          description: Successful update of the given data source collection.
          schema:
            $ref: '#/definitions/GetIndividualCollection'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'
    delete:
      summary: "Delete data source collection present on the ADM with data source collection ID as specified in the request."
      description: Delete the collection ID.
      operationId: DeleteCollectionId
      parameters:
        - $ref: '#/parameters/collectionIdParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
       - application/json
      tags:
        - datasources
      responses:
        '204':
          description: Successful removal of a data source collection.
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/Error400ResponseBody'
        '401':
          description: Unauthorized Request.
          schema:
            $ref: '#/definitions/Error401ResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/Error404ResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/Error409ResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/Error500ResponseBody'

  #--------------------------------------------------- End of Datasources API -----------------------------------------------------------------------


  '/massvc/{customerid}/stylebook/nitro/v1/config/repositories':
    get:
      description: >-
          List all exisiting git repositories present on the ADM.
      operationId: GetAllRepository
      produces:
        - application/json
      tags:
        - repositories
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      responses:
        '200':
          description: Successfully list all git repository present on the ADM.
          schema:
            $ref: '#/definitions/GetAllRepository'
    post:
      description: >-
          Add a GIT repository to the ADM.
      operationId: AddRepository
      produces:
        - application/json
      tags:
        - repositories
      parameters:
        - $ref: '#/parameters/repositoryNameParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/GetIndividualRepository'
      responses:
        '200':
          description: Successful addition of the GIT repository to the ADM.
          schema:
            $ref: '#/definitions/RepositoryResponseBody'

  '/massvc/{customerid}/stylebook/nitro/v1/config/repositories/{repository-name}':
    get:
      description: Retrieves the repository.
      operationId: GetRepository
      parameters:
        - $ref: '#/parameters/repositoryNameParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - repositories
      responses:
        '200':
          description: Successful retrieval of the attributes of the repository.
          schema:
            $ref: '#/definitions/GetIndividualRepository'
    put:
      description: >-
          Modify the GIT repository added to the ADM.
      operationId: PutRepository
      produces:
        - application/json
      tags:
        - repositories
      parameters:
        - $ref: '#/parameters/repositoryNameParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/GetIndividualRepository'
      responses:
        '200':
          description: Successful modification of the attributes of the GIT repository.
          schema:
            $ref: '#/definitions/RepositoryResponseBody'

    delete:
      description: Delete the repository.
      operationId: DeleteRepository
      parameters:
        - $ref: '#/parameters/repositoryNameParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
       - application/json
      tags:
        - repositories
      responses:
       '200':
        description: Successful deletion of the Repository.
        schema:
          $ref: '#/definitions/RepositoryAsyncResponseBody'

  '/massvc/{customerid}/stylebook/nitro/v1/config/repositories/actions/sync':
    post:
      description: >-
        Sync the repository to fetch the latest files from the remote repository.
      operationId: SyncReposotory
      tags:
        - repositories
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/RepositoryActionBody'
      produces:
        - application/json
      responses:
        '200':
          description: This is an async API call. Successful intiation of syncing of the repository.
          schema:
            $ref: '#/definitions/RepositoryAsyncResponseBody'

  '/massvc/{customerid}/stylebook/nitro/v1/config/repositories/actions/reset':
    post:
      description: >-
        Sync the repository to fetch the latest files from the remote repository.
      operationId: ResetRepository
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/RepositoryActionBody'
      produces:
        - application/json
      tags:
        - repositories
      responses:
        '200':
          description: This is an async API call. Successful initiation of resetting the repository.
          schema:
            $ref: '#/definitions/RepositoryAsyncResponseBody'

  '/massvc/{customerid}/stylebook/nitro/v1/config/repositories/{repository-name}/files':
    get:
      description: Retrieves the files synced from the remote repository.
      operationId: GetRepositoryFiles
      parameters:
        - $ref: '#/parameters/repositoryNameParam'
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
      produces:
        - application/json
      tags:
        - repositories
      responses:
        '200':
          description: Successful file in the repository
          schema:
            $ref: '#/definitions/RepositoryListFiles'

  /massvc/{customerid}/stylebook/nitro/v1/config/adc_configs/actions/extract_vservers:
    post:
      description: >-
        This API extracts the candidate root vservers from the source. The source can be an ADC instance ID or a set of 
        CLI commands, from which the vservers will be extracted. The Target ADC is needed so that it can be used for some 
        helper utility to validate the extracted config. The Target is always an instance ID and can be the same as source. 
        You can also filter the result of extracted vservers by various filters such as vserver name, type or protocol, or 
        any combination.
      operationId: ExtractApps
      produces:
        - application/json
      tags:
        - Config Migration
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/ExtractVServersRequestSchema'
      responses:
        '200':
          description: Successful retrieval of the configuration from the ADC instance.
          schema:
            $ref: '#/definitions/ExtractVServersResponseSchema'
        '202':
          description: Asynchronous processing. A job ID is returned that can be tracked and used to retrieve results.
          schema:
            $ref: '#/definitions/JobResponseSchema'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/ErrorResponseBody'
        '401':
          description: Unauthorized.
          schema:
            $ref: '#/definitions/ErrorResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/ErrorResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/ErrorResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/ErrorResponseBody'
        '503':
          description: 'Service temporarily unavailable, please try again later.'
          schema:
            $ref: '#/definitions/ErrorResponseBody'

  /massvc/{customerid}/stylebook/nitro/v1/config/adc_configs/actions/filter_vservers:
    post:
      description: >-
        This API is a helper API used to filter an input list of vservers as per input filter options. A filtering option is already 
        provided by the Extract Vservers API. This is an additional API that can be used if filtering was not done during 
        the extraction and the user wants to filter the vservers after extraction. 
      operationId: FilterVservers
      produces:
        - application/json
      tags:
        - Config Migration
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/FilterVServersRequestSchema'
      responses:
        '200':
          description: Successful retrieval of the configuration from the ADC instance.
          schema:
            $ref: '#/definitions/FilterVServersResponseSchema'
        '202':
          description: Asynchronous processing. A job ID is returned that can be tracked and used to retrieve results.
          schema:
            $ref: '#/definitions/JobResponseSchema'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/ErrorResponseBody'
        '401':
          description: Unauthorized.
          schema:
            $ref: '#/definitions/ErrorResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/ErrorResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/ErrorResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/ErrorResponseBody'
        '503':
          description: 'Service temporarily unavailable, please try again later.'
          schema:
            $ref: '#/definitions/ErrorResponseBody'

  /massvc/{customerid}/stylebook/nitro/v1/config/adc_configs/actions/extract_vservers_config:
    post:
      description: >-
        This is the main API that intelligently extracts all the configuration to be migrated. Given a source, a target and a list of vserver names, it extracts the complete ADC 
        configuration for all the vservers in the input list. This configuration is the one that will get migrated to the target ADC by a subsequent 
        migrate API.
      operationId: ExtractVserversConfig
      produces:
        - application/json
      tags:
        - Config Migration
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/ExtractConfigRequestSchema'
      responses:
        '200':
          description: Successful retrieval of the configuration from the ADC instance.
          schema:
            $ref: '#/definitions/ExtractConfigResponseSchema'
        '202':
          description: Asynchronous processing. A job ID is returned that can be tracked and used to retrieve results.
          schema:
            $ref: '#/definitions/JobResponseSchema'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/ErrorResponseBody'
        '401':
          description: Unauthorized.
          schema:
            $ref: '#/definitions/ErrorResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/ErrorResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/ErrorResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/ErrorResponseBody'
        '503':
          description: 'Service temporarily unavailable, please try again later.'
          schema:
            $ref: '#/definitions/ErrorResponseBody'

  /massvc/{customerid}/stylebook/nitro/v1/config/adc_configs/actions/migrate_vservers_config:
    post:
      description: Extracts and Migrates the configuration of the mentioned vservers from the source to the target.
      operationId: MigrateConfig
      produces:
        - application/json
      tags:
        - Config Migration
      parameters:
        - $ref: '#/parameters/customerid'
        - $ref: '#/parameters/authHeaderParam'
        - $ref: '#/parameters/iscloudHeaderParam'
        - name: Body
          in: body
          required: true
          x-is-map: false
          schema:
            $ref: '#/definitions/MigrateConfigRequestSchema'
      responses:
        '200':
          description: Successful retrieval of the configuration from the ADC instance.
          schema:
            $ref: '#/definitions/MigrateConfigResponseSchema'
        '202':
          description: Asynchronous processing. A job ID is returned that can be tracked and used to retrieve results.
          schema:
            $ref: '#/definitions/JobResponseSchema'
        '400':
          description: Bad Request.
          schema:
            $ref: '#/definitions/ErrorResponseBody'
        '401':
          description: Unauthorized.
          schema:
            $ref: '#/definitions/ErrorResponseBody'
        '404':
          description: Resource Not found.
          schema:
            $ref: '#/definitions/ErrorResponseBody'
        '409':
          description: Conflict.
          schema:
            $ref: '#/definitions/ErrorResponseBody'
        '500':
          description: Service Error.
          schema:
            $ref: '#/definitions/ErrorResponseBody'
        '503':
          description: 'Service temporarily unavailable, please try again later.'
          schema:
            $ref: '#/definitions/ErrorResponseBody'

definitions:
  ImportStyleBookRequestBody:
    title: Import a new StyleBook Request
    type: object
    properties:
      stylebook:
        type: object
        properties:
          source:
            description: The YAML contents of the StyleBook.
            type: string
          content:
            description: The YAML contents of the StyleBook.
            type: string
          icon:
            description: The icon for the StyleBook being imported as base64 encoded.
            type: string
          encoding:
            description: >-
              Optional. The encoding used to encode the value for the source
              property. Valid values are: base64.
            type: string
  GetExportResourceBundle:
    title: Export a resource request
    type: object
    properties:
      options:
        type: object
        properties:
          compress_type:
            description: Compress type of a resource.
            type: string
            enum:
              - ZIP
              - TGZ
          password_protect:
            description: Encrypt the configpack data to protect sensitive data.
            type: boolean
      passphrase:
        description: The passphrase key to be used for encrypting the resource to be exported.
        type: string
  GetExportConfig:
    title: Export a Configpack request
    type: object
    properties:
      options:
        type: object
        properties:
          include_stylebook:
            description: Include the stylebook during export of a configpack.
            type: boolean
          include_targets:
            description: Include the targets of a configpack during export of a configpack.
            type: boolean
          compress_type:
            description: Compress type of a resource.
            type: string
            enum:
              - ZIP
              - TGZ
          password_protect:
            description: Encrypt the configpack data to protect sensitive data.
            type: boolean
      passphrase:
        description: The passphrase key to be used for encrypting the configpack to be exported.
        type: string
  ImportConfigpackRequestBody:
    title: Import a new Configpack Request
    type: object
    properties:
      options:
        type: object
        description: The options to be specified for import.
      configpack_details:
        type: object
        properties:
          compress_type:
            description: Compress type of a resource.
            type: string
            enum:
              - ZIP
              - TGZ
          passphrase:
            type: string
            description: key to be used for decryption of the bundle.
          source:
            description: The json contents of the configpack.
            type: string
          content:
            description: The contents of the configpack.
            type: string
          stylebook:
            $ref: '#/definitions/ImportStyleBookRequestBody'
          config_key:
            type: string
          encoding:
            description: >-
              Optional. The encoding used to encode the value for the source
              property. Valid values are: base64.
            type: string
      targets:
        type: object
  ImportStyleBookResponseBody:
    title: Import a new StyleBook Response
    type: object
    properties:
      stylebook:
        $ref: '#/definitions/StyleBookResponseReference'
  DeleteStyleBookResponseBody:
    title: Remove an existing StyleBook.
    type: object
    properties:
      stylebook:
        $ref: '#/definitions/StyleBookResponseReference'
  ValidateStyleBookRequestBody:
    title: Validate a new StyleBook Request.
    type: object
    properties:
      validate:
        type: object
        properties:
          source:
            description: The YAML contents of the StyleBook.
            type: string
  ValidateStyleBookResponseBody:
    title: Validated a StyleBook Content
    type: object
    properties:
      validate:
        $ref: '#/definitions/StyleBookResponseReference'
  UpdateStyleBookResponseBody:
    title: Updated StyleBook Content
    type: object
    properties:
      stylebook:
        type: object
        properties:
          job_id:
            description: resource ID for the operation.
            type: string
          name:
            description: Name of the StyleBook.
            type: string
          namespace:
            description: Namespace of the StyleBook.
            type: string
          version:
            description: Version of the StyleBook.
            type: string
  UpgradeConfigpacksListRequestBody:
    title: upgrade the StyleBook for configpacks
    type: object
    properties:
      upgrade:
        type: object
        properties:
          stylebook:
            "$ref": "#/definitions/UpgradeStyleBookReference"
          configpacks:
            type: array
            items:
              type: string
  ValidConfigPackChangeResponseBody:
    title: Validate configpack change
    type: object
    properties:
      upgrade:
        description: The upgrade stylebook operation for configpacks.
        type: object
        properties:
          job_id:
            description: The ID of the async job.
            type: string
  CreateConfigpackRequestBody:
    title: Create Configpack Payload Request
    type: object
    properties:
      configpack:
        $ref: '#/definitions/ConfigpackRequestBody'
    required:
      - configpack
  CreateConfigpackResponseBody:
    title: ConfigpackResponse
    type: object
    #properties:
    #  configpack:
    #    $ref: '#/definitions/ConfigpackIDResponse'
  UpdateConfigpackRequestBody:
    title: Update Configpack Request Payload.
    type: object
    properties:
      configpack:
        $ref: '#/definitions/ConfigpackRequestBody'
    required:
      - configpack

  UpdateConfigpackResponseBody:
    title: Update Configpack Response Payload.
    type: object
    #properties:
    #  configpack:
    #    $ref: '#/definitions/ConfigpackIDResponse'
    #required:
    #  - configpack
  DeleteConfigpackResponseBody:
    title: Delete Configpack Response Payload.
    type: object
    #properties:
    #  configpack:
    #    $ref: '#/definitions/ConfigpackIDResponse'
    required:
      - configpack
  UpgradeConfigpackRequestBody:
    title: Upgrade Configpack Payload Request.
    type: object
    properties:
      configpack:
        $ref: '#/definitions/UpgradeConfigpackDetailsRequestBody'
    required:
      - configpack
  DetachTargetsRequestBody:
    title: Detach Targets from Configpack.
    type: object
    properties:
      detach_targets:
        $ref: '#/definitions/TargetDevices'
    required:
      - detach_targets
    example:
      detach_targets:
          instance_id: "9284e6e5-1476-4f97-9c46-cf379921a1fb"

  UpgradeConfigpackResponseBody:
    title: UpgradeConfigpackResponse
    type: object
    #properties:
    #  configpack:
    #    $ref: '#/definitions/ConfigpackIDResponse'
  DetachTargetsResponseBody:
    title: DetachTargetsResponse
    type: object
    required:
      - detach_targets
    example:
      detach_targets:
        new_configpack_id: 87684

  AuditConfigpackResponseBody:
    title: AuditConfigpackResponse
    type: object
    #properties:
    #  configpack:
    #    $ref: '#/definitions/ConfigpackIDResponse'
  GetAuditConfigpackResponseBody:
    title: AuditConfigpackResponse
    type: object
    #properties:
    #  configpack:
    #    $ref: '#/definitions/ConfigpackIDResponse'
  GetAllStyleBooksResponseBody:
    title: GetAllStyleBooksResponse
    type: object
    properties:
      stylebooks:
        type: array
        items:
          $ref: '#/definitions/StyleBookSummaryDescription'
  GetDistinctNamespacesStyleBooksResponseBody:
    title: GetDistinctNamespacesStyleBooksResponse
    type: object
    properties:
      namespaces:
        type: array
        items:
          type: string
  GetStylebooksofNamespaceResponseBody:
    title: GetStylebooksofNamespaceResponse
    type: object
    properties:
      stylebooks:
        type: array
        items:
          $ref: '#/definitions/StyleBookSummaryDescription'
  GetDistinctVersionsStyleBooksResponseBody:
    title: GetDistinctVersionsStyleBooksResponse
    type: object
    properties:
      versions:
        type: array
        items:
          type: string
  GetStylebooksofVersionResponseBody:
    title: GetStylebooksofVersionResponse
    type: object
    properties:
      stylebooks:
        type: array
        items:
          $ref: '#/definitions/StyleBookSummaryDescription'
  GetStyleBookResponseBody:
    title: GetStyleBookResponse
    type: object
    properties:
      stylebook:
        $ref: '#/definitions/StyleBookSummaryDescription'
  GetConfigpacksResponseBody:
    title: GetConfigpacksResponse
    type: object
    properties:
      configpacks:
        type: array
        items:
          $ref: '#/definitions/ConfigpackSummaryDescription'
  GetConfigpackResponseBody:
    title: GetConfigpackResponse
    type: object
    properties:
      configpack:
        $ref: '#/definitions/ConfigpackDescription'
  GetStyleBookSchemaResponseBody:
    title: GetStyleBookSchemaResponse
    type: object
    properties:
      schema:
        $ref: '#/definitions/StyleBookSchemaResponse'
  GetAsyncJobStatusResponseBody:
    title: GetAsyncJobStatusResponse
    type: object
    #properties:
    #  job:
    #    $ref: '#/definitions/JobStatusResponse'
  Parameters:
    description: >-
      A JSON dictionary containing the values for the Parameters of the
      StyleBook, where the key of each item in the dictionary is the name of the
      parameter and the value is the value of the parameter (note that the value
      can be an arbitrary JSON object depending on the type of the parameter
      (refer to the StyleBook schema).
    title: Parameters
    type: object
  ConfigpackRequestBody:
    title: ConfigpackRequest
    type: object
    properties:
      parameters:
        $ref: '#/definitions/Parameters'
      targets:
        $ref: '#/definitions/TargetDevices'
    required:
      - parameters
  UpgradeConfigpackDetailsRequestBody:
    title: UpgradeConfigpackRequest
    type: object
    properties:
      parameters:
        $ref: '#/definitions/Parameters'
      targets:
        $ref: '#/definitions/TargetDevices'
      stylebook:
        $ref: '#/definitions/UpgradeStyleBookReference'
    required:
      - parameters
  UpgradeStyleBookReference:
    title: StyleBookReference
    type: object
    properties:
      name:
        description: Name of the StyleBook
        type: string
      namespace:
        description: Namespace of the StyleBook
        type: string
      version:
        description: Version of the StyleBook
        type: string

  TargetDevices:
    description: >-
      A dictionary specifying the devices to which the configpack is applied.
      The key of each item in the dictionary is the device's IP address and the
      value is a dictionary that contains one item which corresponds to the
      devices's ID in ADM in the form 'id':'<id-value>'
    title: Targets
    type: array
    items:
      type: object
  ConfigpackIDResponse:
    title: Response ConfigPack ID
    type: object
    properties:
      configID:
        description: 'The ID Of the ConfigPack created, updated or deleted.'
        type: string
  StyleBookReference:
    title: StyleBookReference
    type: object
    properties:
      id:
        description: ID of the StyleBook.
        type: string
      name:
        description: Name of the StyleBook.
        type: string
      namespace:
        description: Namespace of the StyleBook.
        type: string
      version:
        description: Version of the StyleBook.
        type: string
      dependencies:
        description: A list of StyleBooks directly used by the current StyleBook.
        type: array
        items:
          $ref: '#/definitions/StyleBookReference'
      reverse_dependencies:
        description: A list of StyleBooks the current StyleBook uses.
        type: array
        items:
          $ref: '#/definitions/StyleBookReference'
  StyleBookResponseReference:
    title: StyleBookResponseReference
    type: object
    #properties:
    #  name:
    #    description: Name of the StyleBook
    #    type: string
    #  namespace:
    #    description: Namespace of the StyleBook
    #    type: string
    #  version:
    #    description: Version of the StyleBook
    #    type: string
  StyleBookSummaryDescription:
    title: StyleBookSummaryDescription
    type: object
    properties:
      id:
        description: ID of the StyleBook.
        type: string
      name:
        description: Name of the StyleBook.
        type: string
      namespace:
        description: Namespace of the StyleBook.
        type: string
      version:
        description: Version of the StyleBook.
        type: string
      description:
        description: Description of the StyleBook.
        type: string
      header:
        description: User friendly description of the Configuration created using this StyleBook (used in ADM GUI).
        type: string
      display_name:
        description: Display name of the StyleBook (used in ADM GUI).
        type: string
      schema_version:
        description: Schema Version of the StyleBook DSL Language.
        type: string
      created_datetime:
        description: Date on which the StyleBook was imported into ADM.
        type: string
      custom:
        description: >-
          A boolean, which when true indicates that this StyleBook is listed in
          the list of StyleBooks by ADM. When false, this StyleBook is
          hidden (for example used by other top-level StyleBooks, which are user
          visible)
        type: string
      builtin_namespaces:
        description: >-
          A dictionary whose keys/values are in the form of 'namespace':
          'version' where each item designates a builtin namespace (and its
          version) used by this StyleBook (currently the ADC Nitro builtin
          namespace is the only builtin namespace).
        type: object
      dependencies:
        description: A list of StyleBooks directly used by the current StyleBook
        type: array
        items:
          $ref: '#/definitions/StyleBookReference'
      primary_keys:
        description: >-
              dictionary of the parameters that are keys for this StyleBook. The key
              of each item is the name of the parameter and the value of the item is
              the value of the parameter.
        type: object
      reverse_dependencies:
        description: >-
          A list of StyleBooks in ADM that are known to use this
          StyleBook.
        type: array
        items:
          $ref: '#/definitions/StyleBookReference'
      private:
        description: >-
            A boolean, which when true indicates that this StyleBook is a private StyleBook.
        type: string
      builtin:
        description: >-
            A boolean, which when true indicates that this StyleBook is a builtin StyleBook.
        type: string
      deprecate:
        description: >-
            A boolean, which when true indicates that this StyleBook is now deprecated and a configpack cannot be created.
        type: string
      primary_key:
        description: >-
            A key whose value is used to name the configpack created using the StyleBook.
        type: array
        items:
          type: string
      repository_name:
        description:  >-
            The name of the GITHUB repository if the StyleBook was synced from one.
        type: string
      username:
        description:  The name of the user who imported the StyleBook to the ADM.
        type: string
      author:
        description:  The name of the author of the StyleBook.
        type: string
      type:
        description:  >-
            The type of the StyleBook used in certain use cases such as, autoscale
        type: string
      update_status:
        type: string
        description: The status info indicating if a custom stylebook can be updated at a given point.
      source:
        description:  The source of the Stylebook as base64 encoded.
        type: string
      icon:
        description: The icon of the Stylebook as base64 encoded.
        type: string
      tenant_id:
        description:  The ID of the tenant.
        type: string
  ConfigpackSummaryDescription:
    title: ConfigpackSummaryDescription
    type: object
    properties:
          id:
            description: ID of the Configpack.
            type: string
          name:
            description: Configpack's StyleBook name.
            type: string
          namespace:
            description: Configpack's StyleBook namespace.
            type: string
          version:
            description: Configpack's StyleBook version
            type: string
          tenant_id:
            description: The ID of the tenant who has created the configpack.
            type: string
          created_datetime:
            description: Date and Time of this configpack creation.
            type: string
          last_modified_datetime:
            description: Date and Time the configpack was last modified.
            type: string
          created_by:
            description: The username of the user who created the configpack.
            type: string
          last_modified_by:
            description: The username of the user who last modified the configpack.
            type: string
          primary_keys:
            description: >-
              dictionary of the parameters that are keys for this StyleBook. The key
              of each item is the name of the parameter and the value of the item is
              the value of the parameter.
            type: object
          config_key:
            description: The unique user chosen ID to identify the configpack in the system.
            type: string
          parameters:
            description: >-
              A dictionary containg the inputs to the StyleBook: the parameter names
              (dictionary keys) and the parameter values (dictionary key values) of
              this configPack.
            type: object
          outputs:
            description: >-
              A dictionary containg the outputs of the StyleBook. Each item of the
              dictionary has as a key the name of the output, and as a value a
              dictionary describing the output. See OutputDescription object.
            type: object
          targets:
            description: The target ADC where the configuration is deployed.
            type: array
            items:
              type: object
              properties:
                instance_id :
                  description: >-
                    The internal unique identifier for the ADC instance added in the ADM.
                  type: string
                id :
                  description: >-
                    The internal unique identifier for the ADC instance added in the ADM.
                  type: string
                instance_ip:
                  description: The IP of the ADC instance.
                  type: string
                roles:
                  description: The role assigned to the ADC instance as per the Stylebook definition.
                  type: array
                  items:
                    type: string
          tags:
            description: The tags.
            type: string
          status:
            description: The status of the deployed configpack.
            type: string
          autoscale_id:
            description: The autoscale ID.
            type: string
          application_id:
            description: The application ID.
            type: string
  ConfigpackDescription:
    title: ConfigpackDescription
    type: object

  StyleBookSchemaResponse:
    title: StyleBookSchemaResponse
    type: object
    properties:
      name:
        description: Name of the StyleBook.
        type: string
      namespace:
        description: Namespace of the StyleBook.
        type: string
      version:
        description: Version of the StyleBook.
        type: string
      prompt_instance_credentials:
        description: Prompt for instance credentials.
        type: boolean
      header:
        description: User friendly Description of the Configuration created using this StyleBook (used in ADM GUI).
        type: string
      parameters:
        description: List of Parameter Descriptions of the StyleBook's Parameters.
        type: array
        items:
          $ref: '#/definitions/StyleBookParameterDescription'
      target_roles:
            description: The target roles for the configuration deployed.
            type: array
            items:
              type: object
              properties:
                min_targets :
                  description: The minimum targets for each role.
                  type: string
                name :
                  description: The name of the role.
                  type: string
  GetObjectsResponseBody:
    title: GetObjectsResponse
    type: object
    properties:
      graph:
        description: List of Parameter Descriptions of the StyleBook's Parameters.
        type: object
  ObjectResponseDescription:
    title: ObjectResponseDescription
    type: object
    #properties:
    #  type:
    #    description: Type of the object
    #    type: string
    #  properties:
    #    description: Properties of the object
    #    type: object
    #  meta-properties:
    #    description: Meta Properties of the object
    #    type: object
  StyleBookModifiedParametersDescription:
    title: StyleBookModifiedParametersDescription
    type: array
    items:
      $ref: '#/definitions/StyleBookParameterDescription'
  StyleBookParameterDescription:
    title: StyleBookParameterDescription
    type: object
    properties:
      name:
        description: Name of the Parameter.
        type: string
      default:
        description: Name of the Parameter.
        type: string
      label:
        description: Label of the Parameter used in ADM GUI.
        type: string
      description:
        description: Verbose description of the parameter.
        type: string
      type:
        description: >-
          The type of the parameter. A valid value can be: string, number,
          boolean, ipaddress, tcp-port, object, or an imported stylebook type.
        type: string
      network:
        description: >-
          The IPAM Network to fetch the IPAddress for a given parameter.
        type: string
      condition_trigger:
        description: Trigger for Parameters Condition to get refreshed schema.
        type: boolean
      value:
        description: Value for the parameter
      min-length:
        description: Minimum number of characters allowed in the parameter.
        type: string
      max-length:
        description: Maximum number of characters allowed in the parameter.
        type: string
      min-items:
        description: Minimum number of items allowed in list type parameter.
        type: string
      max-items:
        description: Maximum number of items allowed in list type parameter.
        type: string
      pattern:
        description: A pattern to validate the input against.
        type: string
      dynamic-network:
        description: >-
          The IPAM Network to fetch the IPAddress for a given parameter when the choice of network is made through dynamic-allocation.
        type: object
        properties:
          name:
            description: Name of the IPAM Network.
            type: string
          reserve_ip:
            description: IP to be requested from the IPAM network.
            type: string
      key:
        description: A boolean indicating whether this parameter is a Key (unique value).
        type: boolean
      required:
        description: >-
          A boolean indicating whether this parameter must be given a value by
          the StyleBook user (a required parameter). Default value is false.
        type: boolean
      updatable:
        description: >-
          A boolean indicating whether this parameter can be updated after
          creation of the configpack (is it updatable?). Default value is true.
        type: boolean
      dynamic-allocation:
        description: >-
          The dynamically chosen IPAM Network to fetch the IPAddress for a given parameter.
        type: boolean
      allowed-values:
        description: >-
          A list of values that are allowed for this parameter. A user can only
          choose one of the values in this list.
        type: array
        items:
          type: string
      data-source:
        description: Specifies a datasource entity belonging to the parameter.
        type: object
        properties:
          name:
            description: Name of the datasource.
            type: string
          type:
            description: Type of the datasource.
            type: string
          collection:
            description: Name of the datasource collection.
            type: string
          primary_key:
            description: Psrimary key of the collection.
            type: string
          id:
            description: Unique ID of the datasource.
            type: string
          collection_id:
            description: Unique ID of the datasource collection.
            type: string
          builtin-version:
            description: A flag that identifies if the datasource is a builtin datasource type.
            type: boolean
      is_datasource:
        description: Specifies if the parameter is defined using datasource expressions.
        type: string
      allow-new-values:
        description: Whether or not dynamic values are allowed in the list.
        type: boolean
      allowed-dynamic-values:
        description: >-
          A list of values that are allowed for this parameter. A user can only
          choose one of the values in this list that gets dynamically populated.
        type: object
      gui:
        description: >-
          An dictionary object used to customize the visual rendering the
          parameter in the ADM GUI.
        type: object
      parameters:
        description: >-
          A list of descriptions for inner parameters scoped by this parameter
          when its type is object. Each inner parameter is described using the
          StyleBookParameterDescription definition.
        type: array
        items:
          $ref: '#/definitions/StyleBookParameterDescription'
      modified_parameters:
        description: >-
          A list of descriptions for inner parameters scoped by this parameter
          when its type is object. Each inner parameter is described using the
          StyleBookParameterDescription definition.
        type: array
        items:
          $ref: '#/definitions/StyleBookModifiedParametersDescription'
    required:
      - name
      - type
  JobStatusResponse:
    title: JobStatusResponse
    type: object
    properties:
      config_id:
        description: The ID of the ConfigPack which concerns the Job.
        type: string
      status:
        description: >-
          Overall status of the Job. When the status is set to 'completed', this
          mean that the Job has ended and the configpack operation has finished.
        type: string
      reasons:
        description: An array of strings explaining the failure if there was one.
        type: array
        items:
          type: string
      progress_info:
        description: >-
          A list of dictionaries. Each describes a step of the Job and its
          outcome status.
        type: array
        items:
          $ref: '#/definitions/JobStepStatus'
    required:
      - config_id
      - status
  JobStepStatus:
    title: JobStepStatus
    type: object
    properties:
      status:
        description: >-
          The current status of this step. The value is 'success' or 'completedi
          if completed successfully.
        type: string
      message:
        description: A textual message explaining the step and its current status.
        type: string
      is_last:
        description: A boolean indicating whether this is the last step of the Job.
        type: boolean
      resource_type:
        description: >-
          If this step concerns the configuration of a ADC resource, the
          type of this resource.
        type: string
      payload_properties:
        description: The properties and their values of the ADC resource.
        type: object
    required:
      - message
      - status
      - is_last

  GetSystemSettings:
    title: GetSystemSettings
    type: object
    properties:
      system_settings:
        description: ->
          List the system settings set for the display of default stylebooks on the ADM GUI.
        type: object
        properties:
          hide_default_sb:
            description: ->
              The flag indicating if the default stylebooks  displayed on the ADM GUI. The value is boolean converted into string.
            type: string
          tenant_id:
            description: The internal ID of the tenant.
            type: string

  PutSystemSettings:
    title: PutSystemSettings
    type: object
    properties:
      system_settings:
        description: ->
          List the system settings set for the display of default stylebooks on the ADM GUI.
        type: object
        properties:
          hide_default_sb:
            description: ->
              The flag indicating if the default stylebooks  displayed on the ADM GUI. The value is boolean converted into string.
            type: string

  GetLabelsResponseBody:
    title: GetLabelsResponseBody
    type: object
    properties:
      tags:
        description: List of all the labels associated with any of the StyleBooks.
        type: array
        items:
          type: string

  GetLabelValueResponseBody:
    title: GetLabelValueResponseBody
    type: object
    properties:
      values:
        description: List of all the values associated with label.
        type: array
        items:
          type: string

  ComputeDataSourceCollectionDataResponse:
    title: ComputeDataSourceCollectionDataResponse
    type: object
    properties:
      collections:
        description: The response data containing the details of the collection data dynamically.
        type: object
    required:
      - collections
    example:
      collection:
        - Static: true
          adv: false
          bgp: false
          cost: '0'
          cost1: '0'
          data: true
          data0: false
          detail: false
          dhcp: false
          direct: false
          distance: '1'
          dynamic: false
          failedprobes: '0'
          flags: false
          gateway: 10.102.201.1
          isis: false
          lbroute: false
          monstatcode: 0
          monstatparam1: 0
          monstatparam2: 0
          monstatparam3: 0
          msr: DISABLED
          nat: false
          netmask: 0.0.0.0
          network: 0.0.0.0
          ospf: false
          permanent: false
          protocol:
            - OSPF
            - ISIS
            - RIP
            - BGP
          retain: 0
          rip: false
          routetype: STATIC
          state: '1'
          td: '0'
          totalfailedprobes: '0'
          totalprobes: '0'
          tunnel: false
          type: true
          weight: '1'
        - Static: false
          adv: false
          bgp: false
          cost: '0'
          cost1: '0'
          data: true
          data0: false
          detail: false
          dhcp: false
          direct: true
          distance: '0'
          dynamic: false
          failedprobes: '0'
          flags: false
          gateway: 127.0.0.1
          isis: false
          lbroute: false
          monstatcode: 0
          monstatparam1: 0
          monstatparam2: 0
          monstatparam3: 0
          msr: DISABLED
          nat: false
          netmask: 255.0.0.0
          network: 127.0.0.0
          ospf: false
          permanent: true
          retain: 0
          rip: false
          routetype: CONNECTED
          state: '1'
          td: '0'
          totalfailedprobes: '0'
          totalprobes: '0'
          tunnel: false
          type: true
          weight: '1'

  GetDatasourceTypeResponse:
    title: GetDatasourceTypeResponse
    type: object
    properties:
      datasource_types:
        type: array
        items:
          $ref: '#/definitions/GetDatasourceType'
    required:
      - datasource_types

  GetIndividualDatasourceType:
    title: GetIndividualDatasourceType
    type: object
    properties:
      datasource_type:
        $ref: '#/definitions/GetDatasourceType'
    required:
      - datasource_type

  GetDatasourceType:
    title: GetDatasourceType
    type: object
    properties:
      id: 
        type: string
        description: Unique ID of the datasource type.
      name:
        type: string
        description: Name of the datasource type.
      description:
        type: string
        description: Description of the datasource type.

  GetCollectionTypeResponse:
    title: GetCollectionTypeResponse
    type: object
    properties:
      collection_types:
        type: array
        items:
          $ref: '#/definitions/GetCollectionType'
    required:
      - collection_types

  GetIndividualCollectionType:
    title: GetIndividualCollectionType
    type: object
    properties:
      collection_type:
        $ref: '#/definitions/GetCollectionType'
    required:
      - collection_type

  GetCollectionType:
    title: GetCollectionType
    type: object
    properties:
      id: 
        type: string
        description: Unique ID of the datasource collection type.
      name:
        type: string
        description: Name of the datasource collection type.
      description:
        type: string
        description: Description of the datasource type.
      datasource_type_id: 
        type: string
        description: Unique ID of the datasource type.
      datasource_type:
        type: string
        description: Datasource Type to which the collection belongs to.
      schema:
        type: object
        properties:
          attributes:
            type: array
            items:
              $ref: '#/definitions/GetAttributeSchema'

  GetAttributeSchema:
    title: GetAttributeSchema
    type: object
    properties:
      name:
        type: string
        description: Nmae of the attribute.
      type:
        type: string
        description: Data type of the attribute.

  GetDatasourceResponse:
    title: GetDatasourceResponse
    type: object
    properties:
      datasources:
        type: array
        items:
          $ref: '#/definitions/GetDatasource'
    required:
      - datasources

  GetIndividualDatasource:
    title: GetIndividualDatasource
    type: object
    properties:
      datasource:
        $ref: '#/definitions/GetDatasource'
    required:
      - datasource

  GetDatasource:
    title: GetDatasource
    type: object
    properties:
      id: 
        type: string
        description: Unique ID of the datasource.
      name:
        type: string
        description: Name of the datasource.
      type:
        type: string
        description: Type of the datasource.
      description:
        type: string
        description: Description of the datasource.
      datasource_type_id: 
        type: string
        description: Unique ID of the datasource type.
      
  GetCollectionResponse:
    title: GetCollectionResponse
    type: object
    properties:
      collections:
        type: array
        items:
          $ref: '#/definitions/GetCollection'
    required:
      - collections

  GetIndividualCollection:
    title: GetIndividualCollection
    type: object
    properties:
      collection:
        $ref: '#/definitions/GetCollection'
    required:
      - collection

  AddIndividualCollection:
    title: AddIndividualCollection
    type: object
    properties:
      collection:
        $ref: '#/definitions/AddCollection'
    required:
      - collection

  AddCollection:
    title: AddCollection
    type: object
    properties:
      id: 
        type: string
        description: Unique ID of the datasource collection.
      name:
        type: string
        description: Name of the datasource collection.
      description:
        type: string
        description: Description of the datasource collection.
      datasource_id: 
        type: string
        description: Unique ID of the datasource.
      collection_type_id: 
        type: string
        description: Unique ID of the datasource collection type.
      collection_type:
        type: string
        description: Collection Type to which the collection belongs to.
      source:
        type: string
        description: The source format of the data.
        enum:
          - data
          - file
      file_data:
        type: object
        properties:
          encoding:
            type: string
            description: The encoding used to encode the value for the source property. Valid values are- base64.
          filename:
            type: string
            description: Filename of the .csv file if source = file.
          contents:
            type: string
            description: Contents of the file when .csv file if source = file.
      data:
        type: array
        items:
          $ref: '#/definitions/GetAttributes'

  GetCollection:
    title: GetCollection
    type: object
    properties:
      id: 
        type: string
        description: Unique ID of the datasource collection.
      name:
        type: string
        description: Name of the datasource collection.
      description:
        type: string
        description: Description of the datasource collection.
      datasource_id: 
        type: string
        description: Unique ID of the datasource.
      datasource_name:
        type: string
        description: Datasource name of the datasource.
      collection_type_id: 
        type: string
        description: Unique ID of the datasource collection type.
      collection_type:
        type: string
        description: Collection Type to which the collection belongs to.
      data:
        type: array
        items:
          $ref: '#/definitions/GetAttributes'

  GetAttributes:
    title: GetAttributes
    type: object

  GetIndividualRepository:
    title: GetIndividualRepository
    type: object
    #properties:
    #    $ref: '#/definitions/RepositorySummaryDescription'

  RepositorySummaryDescription:
    title: RepositorySummaryDescription
    type: object
    properties:
      apikey:
        description: >-
          Personal access tokens function like ordinary OAuth access tokens. They can be used instead of a password for Git over HTTPS, or can be used to authenticate to the API over Basic Authentication.
        type: string
      clientid:
        description: The client ID you received from GIT when you registered.
        type: string
      id:
        description: The internal unique ID given to the repository.
        type: string
      last_sync_time:
        description: The timestamp of the last sync event.
        type: string
      password:
        description: The password of the remote GIT repository.
        type: string
      repository_branch:
        description: The name of the branch of the remote repository.
        type: string
      repository_name:
        description: >-
          The user defined name of the remote GIT repository define in the ADM.
        type: string
      repository_url:
        description: The remote GIT URL to connect over https.
        type: string
      sha:
        description: >-
          ID (a.k.a. the "SHA" or "hash") that allows you to keep record of what changes were made when and by who.
        type: string
      status:
        description: The current status of the local repository.
        type: string
      tenant_id:
        description: >-
         The unique internal ID of the tenant to which the username is associated with.
        type: string
      type:
        description: The type of the GIT repository.
        type: string
      username:
        description: The username registered with the remote repository.
        type: string

  ComputeDataSourceCollectionDataRequest:
    title: ComputeDataSourceCollectionDataRequest
    type: object
    properties:
      computecollectiondata:
        description: The request data containing the details required to compute the collection data.
        type: object
        properties:
          collection_name:
            type: string
          datasource_type:
            type: string
          datasource_name:
            type: string
          collection_id:
            type: string
          builtin:
            type: boolean
          datasource_id:
            type: string

  GetDataSourceCollectionSchema:
    title: GetDataSourceCollectionSchema
    type: object
    properties:
      schema:
        description: The set of all attributes associated with the collection.
        type: object
        properties:
          attributes:
            description: The list of all the atrributes of collection and their property details .
            type: array
            items:
              type: object

  GetAllRepository:
    title: GetAllRepository
    type: object
    properties:
      repositories:
        description: The list of all git repositories registered in the ADM.
        type: array
        items:
          $ref: '#/definitions/GetIndividualRepository'

  RepositoryResponseBody:
    title: RepositoryResponse
    type: object
    properties:
      repositories:
        description: The list of all git repositories registered in the ADM.
        type: object
        #properties:
        #  id:
        #    description: The internal id of the respository

  RepositoryActionBody:
    title: RepositoryActionBody
    type: object
    properties:
      repositories:
        description: The list of all git repositories registered in the ADM.
        type: array
        items:
          $ref: '#/definitions/GetIndividualRepositoryAction'
        #properties:
        #  respository_id:
        #    description: The internal id of the respository
  GetIndividualRepositoryAction:
    title: GetIndividualRepositoryAction
    type: object

  RepositoryAsyncResponseBody:
    title: RepositoryAsyncResponse
    type: object
    properties:
      repository:
        description: The list of all git repositories registered in the ADM.
        type: object
        #properties:
        #  job_id:
        #    description: The internal id of the respository

  RepositoryListFiles:
    title: RepositoryListFiles
    type: object
    properties:
      repository_file:
        description: The list of all files in the local repository registered in the ADM.
        type: array
        items:
          $ref: '#/definitions/RepositoryFile'

  RepositoryFile:
    title: RepositoryAsyncResponse
    type: object
    properties:
      filename:
        description: >-
          The name of repository file as defined in the remote git repository.
        type: string
      filepath:
        description: The path of the repository files in the ADM file system
        type: string
      id:
        description: The internal unique ID of the repository file.
        type: string
      last_sync_time:
        description: >-
          The timestamp when the file was last synced from the remote repository in the ADM.
        type: string
      message:
        description: The status of the last action taken on the file.
        type: string
      repository_name:
        description: The name of the repository in the ADM.
        type: string
      resource:
        description: The type of the resource.
        type: string
      resource_id:
        description: The internal unique ID of the resource.
        type: string
      sha:
        description: >-
          ID (a.k.a. the "SHA" or "hash") that allows you to keep record of what changes were made when and by who.
        type: string
      source:
        description: The base64 encoded file contents.
        type: string
      status:
        description: The status of the file.
        type: string
      tenant_id:
        description: ->
          The internal unique ID of the tenant associated with the user.
        type: string

  CreateLabelBody:
    title: CreateLabelBody
    type: object
    properties:
      tags:
         type: array
         items:
            $ref: '#/definitions/LabelValue'

  CreateConfigLabelBody:
    title: CreateConfigLabelBody
    type: object
    properties:
      tags:
         type: array
         items:
            $ref: '#/definitions/LabelValue'
      parents:
         type: array
         items:
            $ref: '#/definitions/InheritLabelData'

  InheritLabelData:
    title: InheritLabelData
    type: object
    properties:
      parent_id:
         description: The parent StyleBook name if exists.
         type: string
      inherit_all:
         description: Flag to specify if all tags of parent have been set to inherit.
         type: boolean


  LabelValue:
    title: LabelValue
    type: object
    properties:
      tag:
        description: The string idication the label attached.
        type: string
      value:
        description: The string indicating the value of the label.
        type: string
      parent_id:
         description: The parent StyleBook name if exists.
         type: string

  OutputDescription:
    title: OutputDescription
    type: object
    properties:
      name:
        description: >-
          The name of this Output as specified in the StyleBook of this
          Configpack.
        type: string
      type:
        description: >-
          The type of this Output. This can be a simple type, or a StyleBook
          type (builtin or user-defined).
        type: string
      properties:
        description: >-
          For Outputs that have a non-simple type, these are the properties of
          the object. Each item in the dictionary has a property name as the key
          and a property value as the value.
        type: object
      components:
        description: >-
          The inner components that make up this output for components whose
          type is another StyleBook. This is a dictionary where the keys are the
          name of the inner components and the value of each key is an
          OutputDescription definition.
        type: object
    required:
      - name
      - type

  ExtractVServersRequestSchema:
    title: ExtractVserversSchema
    type: object
    properties:
      adc_config:
        allOf:
          - $ref: '#/definitions/SourceAndTargetSchema'
          - $ref: '#/definitions/FilterOptionsSchema'
        required:
          - source
          - target
        example:
          source:
            instance_id: f2380661-2d0d-478c-8c1d-f40be9e75227
          target:
            instance_id: 94a3ec30-f4e5-411b-aa19-1a8a564b7f73
          filter_options:
            vserver_protocol: SSL

  FilterVServersRequestSchema:
    title: FilterVserversSchema
    type: object
    properties:
      adc_config:
        allOf:
          -
            type: object
            description: The ADC configuration.
            properties:
              vservers:
                description: List of vservers on which filter needs to be applied.
                type: array
                items:
                    $ref: '#/definitions/VServerBaseAttributesSchema'
          -
            $ref: '#/definitions/FilterOptionsSchema'
        required:
          - vservers
          - filter_options
        example:
            vservers:
                -
                  vserver_name: csv1
                  vserver_type: CSVSserver
                  vserver_protocol: SSL
                  vserver_ipaddress: 10.70.35.20
                -
                  vserver_name: lbv1
                  vserver_type: LBVSserver
                  vserver_protocol: HTTP
                  vserver_ipaddress: 10.70.35.31
            filter_options:
              vserver_ipaddress: 10.70.35.31

  ExtractConfigRequestSchema:
    title: ExtractConfigSchema
    type: object
    properties:
      adc_config:
        allOf:
          - $ref: "#/definitions/SourceAndTargetSchema"
          - $ref: "#/definitions/VServersToExtractSchema"
          -
            type: object
            properties:
              validate_extracted_config:
                description: Set it to true for validating the source ADC config.
                type: boolean
                default: false
        required:
          - source
          - target
          - vservers
        example:
          source:
            instance_id: f2380661-2d0d-478c-8c1d-f40be9e75227
          target:
            instance_id: 94a3ec30-f4e5-411b-aa19-1a8a564b7f73
          vservers:
            -
              vserver_name: csv1
              vserver_type: CSVServer
              target_vservers:
                - 
                  vserver_type: LBVServer
                  vserver_name: lbv1
                - 
                  vserver_type: LBVServer
                  vserver_name: lbv2
          validate_extracted_config: false

  MigrateConfigRequestSchema:
    title: MigrateConfigSchema
    type: object
    properties:
      adc_config:
        allOf:
          -
            type: object
            properties:
              appname:
                description: Name of the application.
                type: string
          - $ref: "#/definitions/SourceAndTargetSchema"
          - $ref: "#/definitions/VServersToExtractSchema"
          - $ref: "#/definitions/CommonExtractConfigSchema"
          -
            type: object
            properties:
              autoscale_params:
                description: Autoscale Parameters when the target is an AutoScaleGroup ID (rather than Instance ID).
                type: object
                properties:
                  zonename:
                    description: Name of the zone.
                    type: string
                  domainname:
                    description: Name of the domain.
                    type: string
                  accesstype:
                    description: Access type.
                    type: string
                  auto_allocated:
                    description: Auto allocated. 
                    type: boolean
                    default: false
              global_config:
                description: List of global configuration settings to apply on the target.
                type: array
                items:
                  type: string
            required:
              - source
              - target
              - vservers
              - appname
        example:
          appname: App1
          source:
            instance_id: f2380661-2d0d-478c-8c1d-f40be9e75227
          target:
            instance_id: 94a3ec30-f4e5-411b-aa19-1a8a564b7f73
          vservers:
            -
              vserver_name: csv1
              vserver_type: CSVServer
              target_vservers:
                - 
                  vserver_type: LBVServer
                  vserver_name: lbv1
                - 
                  vserver_type: LBVServer
                  vserver_name: lbv2

  JobResponseSchema:
    title: JobResponseSchema
    type: object
    properties:
      adc_config:
        description: The ADC configuration.
        type: object
        properties:
          job_id:
            description: The ID of the async job.
            type: string

  ExtractVServersResponseSchema:
    title: ExtractVserversResponseSchema
    type: object
    properties:
      adc_config:
        $ref: "#/definitions/ExtractedVServersSchema"

  FilterVServersResponseSchema:
    title: FilterVserversResponseSchema
    type: object
    properties:
      adc_config:
        description: The ADC configuration.
        type: object
        properties:
          vservers:
            description: List of vservers after applying the filter options.
            type: array
            items:
              $ref: "#/definitions/VServerBaseAttributesSchema"
        required:
          - vservers

  ExtractConfigResponseSchema:
    title: ExtractConfigResponseSchema
    description: Response results of the Extract VServers Config API.
    type: object
    properties:
      adc_config:
        allOf:
          -
            type: object
            properties:
              application_config:
                description: ADC configuration related to the selected vservers that constitute the application as a list of CLI commands.
                type: array
                items:
                  type: string
          - $ref: "#/definitions/CommonExtractConfigSchema"
          -
            type: object
            properties:
              global_config:
                description: List of global configuration settings to apply on the target.
                type: array
                items:
                  type: object
                  properties:
                    source_config:
                      description: Global configuration settings on the source.
                      type: string
                    target_config:
                      description: Global configuration settings on the target.
                      type: string
                    corrective_config:
                      description: Corrective configuration to be applied on the target.
                      type: string
              unsupported_config:
                description: Unsupported configuration related to the selected vservers that constitute the application.
                type: object
                properties:
                  premigration_config:
                    type: array 
                    items:
                      description: List of unsupported CLI configuration commands that need to be applied manually prior to migrating the config.
                      type: string
                  postmigration_config:
                    type: array 
                    description: List of unsupported CLI configuration commands that need to be applied manually post migration of the config.
                    items:
                      type: string
              modified_application_config:
                description: Modified list of configuration settings to apply on the target.
                type: array
                items:
                  type: string
              config_inspection:
                description: Details of issues found in the application config.
                type: object
                properties:
                  not_applicable_for_ads_migration:
                    description: Configuration is not applicable for migration on ADS.
                    type: array
                    items:
                      allOf:
                        - $ref: "#/definitions/CommonConfigInspectionSchema"
                  currently_not_supported_in_migration:
                    description: Configuration is currently not supported in migration.
                    type: array
                    items:
                      allOf:
                        - $ref: "#/definitions/CommonConfigInspectionSchema"
                  reference_to_non_existing_entities:
                    description: Configuration is referring to entities that does not exist.
                    type: array
                    items:
                      allOf:
                        - $ref: "#/definitions/CommonConfigInspectionSchema"
                  reference_of_config_errors:
                    description: Configuration is referring to entities that already have some errors.
                    type: array
                    items:
                      allOf:
                        - $ref: "#/definitions/CommonConfigInspectionSchema"
                  builtin_entities_references:
                    description: Configuration referred by ADC builtin entities
                    type: array
                    items:
                      allOf:
                        - $ref: "#/definitions/CommonConfigInspectionSchema"


  MigrateConfigResponseSchema:
    title: MigrateConfigResponseSchema
    description: The response payload for a successful migration of configuration from source to target.
    type: object
    properties:
      adc_config:
        description: The ADC configuration.
        type: object
        properties:
          configpack_id:
            type: string
          message:
            type: string

  ErrorResponseBody:
    properties:
      errorcode:
        type: integer
        example: 45633
      errormessage:
        type: string
        example: application doesn't exist

  SourceAndTargetSchema:
    type: object
    properties:
      source:
        description: Contains either a reference to source ADC instance  or a list of CLI configuration commands.
        type: object
        properties:
          instance_id:
            description: Unique ID of the managed ADC from where the configuration to be migrated is extracted.
            type: string
          cli_commands:
            description: List of initial configration commands from which the configuration to be migrated is extracted.
            type: array
            items:
              type: string
      target:
        description:  Contains either a reference to target ADC instance or target ADC AutoScaleGroup ID
        type: object
        properties:
          instance_id:
            description: Unique ID of the managed ADC where the configuration needs to be migrated
            type: string
          autoscalegroup_id:
            description: Unique ID of the managed ASG where the configuration needs to be migrated
            type: string

  FilterOptionsSchema:
    description: Specify the filter criteria for extracting the vservers. The values provided for the filter fields will be run through a 'contains' on the vserver list. The final vserver list will be a boolean AND of the filter options
    type: object
    properties:
      filter_options:
        $ref: '#/definitions/VServerBaseAttributesSchema'

  VServerBaseAttributesSchema:
    allOf:
      - $ref: '#/definitions/VServerNameAndTypeSchema'
      - 
        type: object
        properties:
          vserver_protocol:
            description: Protocol used by the vserver
            type: string
          vserver_ipaddress:
            description: IP address of the vserver
            type: string
          vserver_port:
            description: Listening port of the vserver
            type: number

  VServerNameAndTypeSchema:
    type: object
    properties:
      vserver_type:
        description: Type of vserver.
        type: string
      vserver_name:
        description: Name of the vserver.
        type: string

  VServersToExtractSchema:
    type: object
    properties:
      vservers:
        description:  List of vservers for which ADC configuration needs to be extracted.
        type: array
        items:
          allOf:
            - $ref: '#/definitions/VServerNameAndTypeSchema'
            - 
              type: object
              properties:
                target_vservers:
                  description:  List of targets for a content switching endpoint. This option is applicable only if a subset of target vservers needs to included in the extracted config
                  type: array
                  items:
                    $ref: '#/definitions/VServerNameAndTypeSchema'
    required:
      - vservers

  ExtractedVServersSchema:
    type: object
    properties:
      vservers:
        description:  List of extracted vservers. 
        type: array
        items:
          allOf:
            - $ref: '#/definitions/VServerBaseAttributesSchema'
            - 
              type: object
              properties:
                target_vservers:
                  description:  List of nested vservers referenced by the parent vserver.
                  type: array
                  items:
                    $ref: '#/definitions/VServerBaseAttributesSchema'
    required:
      - vservers

  PasswordAttributesSchema:
    description: Description of a password attribute used in the config.
    type: object
    properties:
      resource_type:
        description: Type of ADC entity.
        type: string
      resource_name:
        description: Name of the ADC entity.
        type: string
      attribute_name:
        description: Name of the entity's attribute that denotes a password.
        type: string
      attribute_value:
        description: Value of the password.
        type: string

  FileUploadSchema:
    description: Description of a file to upload on the target.
    type: object
    properties:
      resource_type:
        description: Type of resource.
        type: string
      resource_name:
        description: Name of the resource.
        type: string
      filename:
        description: Name of the file.
        type: string
      file_content:
        description: Content of file.
        type: string
        
  CertificatesSchema:
    description: Description of a certificate to upload on the target.
    type: object
    properties:
      id:
        description: Cerstore ID of certificates
        type: string
      name:
        description: Name of resource.
        type: string
      cert:
        description: Name of certfile.
        type: string
      key:
        description: Name of keyfile.
        type: string
      certkeyname:
        description: Name of certkey.
        type: string
                
  IPPortConfigsSchema:
    description: Description of IP/Port configuration for backend vserver and services for a root vserver.
    allOf:
      - $ref: '#/definitions/VServerNameAndTypeSchema'
      -
        type: object
        properties:
          ip_port_config:
            description:  List describing the IP/Port configuration of referenced entities.
            type: array
            items:
              $ref: "#/definitions/IPPortConfigSchema"
  IPPortConfigSchema:
    description: Description of an IP/Port configuration for a vserver or a backend service.
    type: object
    properties:
      resource_type:
        description: Type of resource.
        type: string
      resource_name:
        description: Name of the resource.
        type: string
      ip:
        description: IP address.
        type: string
      port:
        description: Listening port of the resource.
        type: number
      node_id:
        description: Unique Identifier for the resource object.
        type: string
      parent:
        description: Node ID of the parent entity.
        type: string
      servername:
        description: Name of the servicegroup member/server in case of servicegroup/service.
        type: string

  CommonExtractConfigSchema:
    description: Common sets of configuration in request/response of ExtractConfig API.
    type: object
    properties:
      file_uploads:
        description: List of files to upload on the target.
        type: array
        items:
          $ref: "#/definitions/FileUploadSchema"
      certificates:
        description: List of ssl certificates.
        type: array
        items:
          $ref: "#/definitions/CertificatesSchema"
      password_attributes:
        description: List of values for password accepting attributes.
        type: array
        items:
          $ref: "#/definitions/PasswordAttributesSchema"
      ip_port_configs:
        description: Modified IP and Port information of endpoints and backend servers as per the migration target.
        type: array
        items:
          $ref: "#/definitions/IPPortConfigsSchema"

  CommonConfigInspectionSchema:
    description: Common sets of configuration in configuration inspection object.
    type: object
    properties:
      index:
        description: Index of the configuration in application_config.
        type: string
      issue:
        description: Issues in the configuration.
        type: object
        properties:
          message:
            description: Error Message.
            type: string
          feature:
            description: ADC feature corresponding to the configuration.
            type: string
      action:
        description: Action taken on the config.
        type: string
  Error400ResponseBody:
    properties:
      errorcode:
        type: integer
        example: 45633
      message:
        type: string
        example: bad request. URL attribute missing.
  Error404ResponseBody:
    properties:
      errorcode:
        type: integer
        example: 45654
      message:
        type: string
        example: configpack with ID 829102 cannot be found.
  Error409ResponseBody:
    properties:
      errorcode:
        type: integer
        example: 45712
      message:
        type: string
        example: conflict. StyleBook with name A, namespace B and version C already exists.
  Error500ResponseBody:
    properties:
      errorcode:
        type: integer
        example: 45724
      message:
        type: string
        example: Internal Service error. Please report error 289101-8sa672-210a to service support.

  Error401ResponseBody:
    properties:
      errorcode:
        type: integer
        example: 45655
      message:
        type: string
        example: configpack with ID 829102 is not authorized for this user.
