Armor Connector API

Connector management operations

Documentation

Specifications

Other Resources

OpenAPI Specification

armor-connector-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Container Security Connector API
  description: 'This API provides an interface for configuring and interacting with Armor''s container security platform.


    To connect to this API, use the following fully-qualified domain name (FQDN):

    `compliance.api.secure-prod.services/containers`

    '
  version: 1.0.0
servers:
- url: https://compliance.api.secure-dev.services/containers
  description: Development
- url: https://compliance.api.secure-stage.services/containers
  description: Staging
- url: https://compliance.api.secure-prod.services/containers
  description: Production
security:
- OAuth2: []
tags:
- name: Connector
  description: Connector management operations
paths:
  /connectors/aws-base:
    get:
      tags:
      - Connector
      summary: Get AWS Configuration Details
      description: Returns values necessary for configuring AWS IAM ahead of configuring AWS ECR-specific Connectors.
      operationId: getAwsBaseConfig
      parameters:
      - $ref: '#/components/parameters/AccountContext'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AwsBaseResponse'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /connectors:
    get:
      tags:
      - Connector
      summary: Get All Connectors
      description: Returns a list of all connectors.
      operationId: getAllConnectors
      parameters:
      - $ref: '#/components/parameters/AccountContext'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ViewAllConnectorsResponse'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
    post:
      tags:
      - Connector
      summary: Create Connector
      description: Creates a new connector.
      operationId: createConnector
      parameters:
      - $ref: '#/components/parameters/AccountContext'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectorCreateRequest'
      responses:
        '202':
          description: Connector creation accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectorCreateResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /connectors/{id}:
    get:
      tags:
      - Connector
      summary: Get Connector Detail
      description: Returns details for a specific connector.
      operationId: getConnectorDetail
      parameters:
      - $ref: '#/components/parameters/AccountContext'
      - $ref: '#/components/parameters/ConnectorId'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectorDetailResponse'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    delete:
      tags:
      - Connector
      summary: Delete Connector
      description: Deletes a specific connector.
      operationId: deleteConnector
      parameters:
      - $ref: '#/components/parameters/AccountContext'
      - $ref: '#/components/parameters/ConnectorId'
      responses:
        '200':
          description: Connector deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectorDeleteResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  responses:
    NotFound:
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
  schemas:
    ConnectorAzureParam:
      type: object
      required:
      - displayName
      - applicationId
      - clientSecret
      properties:
        displayName:
          type: string
          description: Friendly name for the connector
        applicationId:
          type: string
          description: Azure application ID
        clientSecret:
          type: string
          description: Azure client secret
    ConnectorEcrParam:
      type: object
      required:
      - displayName
      - externalId
      - arn
      properties:
        displayName:
          type: string
          description: Friendly name for connector
        externalId:
          type: string
          description: The external ID to access the role
        arn:
          type: string
          description: AWS role ARN created to allow access
    ConnectorDeleteResponse:
      type: object
      properties:
        connectorId:
          type: number
          description: Id for the connector deleted
    ConnectorCreateRequest:
      type: object
      required:
      - type
      properties:
        type:
          type: number
          description: Vendor type id
        awsConnector:
          $ref: '#/components/schemas/ConnectorEcrParam'
        gcpConnector:
          $ref: '#/components/schemas/ConnectorGcrParam'
        azureConnector:
          $ref: '#/components/schemas/ConnectorAzureParam'
        dockerHubConnector:
          $ref: '#/components/schemas/ConnectorOthersParam'
    ViewAllConnectorsResponse:
      type: object
      properties:
        id:
          type: number
          description: Id of the connector
        vendorTypeId:
          type: number
          description: Vendor Type Id
        status:
          type: string
          description: Status of the connector (Accepted/Processing/Active/Error)
        displayName:
          type: string
          description: Friendly name of the connector
        awsAccountId:
          type: string
          description: AWS Account Id of ECR connectors
        createdDate:
          type: string
          description: The date & time the connector was created
    ConnectorOthersParam:
      type: object
      required:
      - displayName
      - username
      - password
      properties:
        displayName:
          type: string
          description: Friendly name for the connector
        username:
          type: string
          description: Username to connect to registry (base64 format)
        password:
          type: string
          description: Password to connect to registry (base64 format)
    AwsBaseResponse:
      type: object
      properties:
        accountId:
          type: string
          description: AWS Account ID
        externalId:
          type: string
          description: External ID
    Message:
      type: object
      properties:
        message:
          type: string
          description: Error or informational message
    ConnectorDetailResponse:
      type: object
      properties:
        id:
          type: number
          description: Id of the connector
        vendorTypeId:
          type: number
          description: Vendor Type Id
        status:
          type: string
          description: Status of the connector (Accepted/Deleted/Processing/Active/Error)
        displayName:
          type: string
          description: Friendly name of the connector
        awsAccountId:
          type: string
          description: AWS Account Id (For Amazon ECR Connectors)
        gcpProjectId:
          type: string
          description: GCP project Id (For Google Cloud Registry Connectors)
        gcpConnectorId:
          type: string
          description: Internal unique identifier for the GCP connector, sharable with Armor Support upon their request
        acrConnectorId:
          type: string
          description: Internal unique identifier for the Azure connector, sharable with Armor Support upon their request
        createdBy:
          type: string
          description: The user who created the connector
        createdDate:
          type: string
          description: The date & time the connector was created
        modifiedBy:
          type: string
          description: The user who modified the connector
        modifiedDate:
          type: string
          description: The date & time the connector was updated
    ConnectorGcrParam:
      type: object
      required:
      - displayName
      - serviceAccountJson
      properties:
        displayName:
          type: string
          description: Friendly name for the connector
        serviceAccountJson:
          type: string
          description: Configuration JSON file
    ConnectorCreateResponse:
      type: object
      properties:
        connectorId:
          type: number
          description: Id for the connector created
  parameters:
    AccountContext:
      name: x-account-context
      in: header
      required: true
      description: Account context identifier
      schema:
        type: integer
      example: 4
    ConnectorId:
      name: id
      in: path
      required: true
      description: Connector ID
      schema:
        type: integer
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.armor.com/auth/authorize
          scopes: {}