openapi: 3.0.1
info:
  title: PCM Vulnerabilities API
  description: |

    The PCM Vulnerabilities API is a rest API allowing access to vulnerability data, including Qualys EC2 instance scan reports.
    This rest API is primarily backed by an Athena database, so the interactions with the api are reflective of interactions with Athena.

    All queries against this API follow this pattern:
    1. Authorization:
       Retrieve an api access token from the authorization endpoint.
       This token will be used to authorize as a Bearer token on all api requests.
    2. Query execution:
       Use a POST to execute a query. Optional query filter criteria will be included on the POST body.
       By default, the api will wait up to 20 seconds for the database to respond.
       If the database succeeds in less than 20 seconds, a response with a link to the query results is returned with status "SUCCESS".
       If the database does not complete the query in under 20 seconds, a response with no results is returned with status "RUNNING".
       In this case, you must poll for the results using the query execution ID.
    3. Query execution finder:
       Use a GET to poll for an existing query execution by query execution ID.
       This allows querying for the results of a query execution until the execution succeeds.
       This also allows retrieving the results of past query executions.
      
    Note that the query results are not directly included on the response. Instead, a S3 pre-signed URL is returned.
    You may use this link to download the CSV formatted query results.
    This link is valid for a limited amount of time, but you can retrieve a new S3 pre-signed URL using the query execution finder.
     
    Also note that a valid authorization token might not work for all endpoints in this API.
    Depending on the scope of your user group's access, your user group will be limited to a subset of the endpoints documented.
  version: 0.3.0
servers:
  - url: 'https://api.pearsoncloudmanagement.com/vulnerabilities'
    description: Production PCM Vulnerabilities API
tags:
  - name: AWS Instances
    description: |
      Information about AWS EC2 instances including account, region, tags, operating system, and a summary of host vulnerabilities.
      Each row of the results CSV represents a single instance on a specific date.
      These endpoints have access to AWS instance information in any Pearson AWS account.
  - name: AWS Vulnerabilities
    description: |
      Information about AWS EC2 instance vulnerabilities including account, region, tags, operating system, and detailed information about the vulnerability.
      Each row of the results CSV represents a single vulnerability on a specific instance and date.
      These endpoints have access to AWS instance vulnerability information in any Pearson account.
  - name: AWS Qualys Agent Coverage
    description: |
      Information about Qualys agent coverage of AWS EC2 instances.
      Each row of the results CSV represents a t_appid in a specific account, with a roll up of the number of corresponding EC2 instances with a Qualys agent installed.
      These endpoints have access to AWS instance Qualys agent coverage information in any Pearson account.
  - name: SRE Team X
    description: |
      Information about AWS EC2 instance vulnerabilities including account, region, tags, operating system, and detailed information about the vulnerability.
      Each row of the results CSV represents a single vulnerability on a specific instance and date.
      These endpoints have access to AWS instance vulnerability information in SRE team X accounts/services.
  - name: AWS VPD
    description: |
      Information about AWS VPD including t_AppID, number of instances, number of vulnerabilities, VPD, and report date.
      Each row of the results CSV represents a t_AppID in a specific account, with the VPD information corresponding to that t_AppID
      These endpoints have access to AWS instance vulnerability information in any Pearson account.
  - name: Health & Status
    description: Information about health and status of the vulnerabilities API
  - name: Authorization
    description: |
      Endpoints to retrieve an authorization token for use with all other endpoints in this API.
      All authorization tokens are used as Bearer tokens for subsequent API calls.
x-amazon-apigateway-request-validators:
  all:
    validateRequestBody: true
    validateRequestParameters: true
  params-only:
    validateRequestBody: false
    validateRequestParameters: true
paths:
  /authtoken:
    post:
      tags:
        - Authorization
      summary: Retrieve Authorization Token
      description: |
        Retrieve an authorization token using a user_group_name and user_group_token.
        Include a valid user_group_name and user_group_token pair on the post body.
        The user_group_name and user_group_token must be base64 encoded.
        Please note that a valid api access token may not work for all endpoints in this API, depending on the scope of access for your user group.
      operationId: createAuthToken
      requestBody:
        description: Required JSON body including the base64 encoded user_group_name and user_group_token.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                user_group_name:
                  description: url base64 encoded user_group_name. Required.
                  type: string
                  nullable: false
                user_group_token:
                  description: url base64 encoded user_group_token. Required
                  type: string
                  nullable: false
      responses:
        '201':
          description: |
            The user_group_name and user_group_token are valid.
            Response contains an api_access_token for use as a Bearer token with subsequent API calls.
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_access_token:
                    description: api_access_token for use as a Bearer token with subsequent API calls
                    type: string
                    nullable: false
        '400':
          description: Bad Request
        '401':
          description: Invalid user_group_name or user_group_token
        '403':
          description: Forbidden
        '500':
          description: Server error. Try again.
      x-amazon-apigateway-integration:
        type: aws_proxy
        uri: 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:VulnerabilityManagementAuthTokenFunction/invocations'
        httpMethod: POST
        passthroughBehavior: when_no_match
        contentHandling: CONVERT_TO_TEXT
  /healthstatus:
    get:
      tags:
        - Health & Status
      summary: Find health and status
      description: Retrieve the health and status of the vulnerabilities API.
      operationId: findHealthStatus
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: healthy
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: No health and status found
        '500':
          description: Server error.  Try again.
      security:
        - vulnerabilities-auth1:
            - vulnerabilities-ro/read
      x-amazon-apigateway-request-validator: params-only
      x-amazon-apigateway-integration:
        type: aws_proxy
        uri: 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:VulnerabilityManagementHealthStatusFunction/invocations'
        httpMethod: POST
        passthroughBehavior: when_no_match
        contentHandling: CONVERT_TO_TEXT
  /aws/instances:
    get:
      tags:
        - AWS Instances
      summary: Find an AWS instances query execution
      description: |
        Retrieve the status of an existing AWS Instances query. Must use a valid query execution id of an existing query.
        Use this endpoint to poll for the results of a query until it completes (whether successful, cancelled, or failed).
        You may also use this endpoint to retrieve the results of a previously completed query so long as you have its valid query execution id.

        The results of the query will not be included on the response body directly.
        Instead, the response body will contain a pre-signed S3 url from which you may download the results.
        This pre-signed url is available for a limited time. Re-run this endpoint with the same query execution id to retrieve a new pre-signed S3 url.
      operationId: findAwsInstancesQuery
      parameters:
        - name: query_execution_id
          in: query
          description: Unique identifier of an existing query
          schema:
            type: string
            format: uuid
            example: 61842b40-305f-479c-a9d8-d1e1cf3cf951
      responses:
        '200':
          description: 'Query execution found, status information included in the response body.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  query_execution_id:
                    type: string
                    format: uuid
                    example: 61842b40-305f-479c-a9d8-d1e1cf3cf951
                    description: Execution id. May be used to search for this query's status.
                  query_execution_status:
                    type: string
                    enum:
                      - QUEUED
                      - RUNNING
                      - SUCCEEDED
                      - FAILED
                      - CANCELLED
                    example: SUCCEEDED
                    description: Status of this query.
                  query_execution_start:
                    type: string
                    format: date-time
                    nullable: true
                    example: '2017-07-21T17:32:28Z'
                    description: Nullable. Timestamp for when this query began executing. Null if the query has not been started.
                  query_execution_end:
                    type: string
                    format: date-time
                    nullable: true
                    example: '2017-07-21T17:32:58Z'
                    description: Nullable. Timestamp for when this query finished executing. Null if the query has not completed.
                  query_results:
                    type: string
                    nullable: true
                    example: 'http://www.presigned.s3.url.com/2a64a95bf7c'
                    description: |
                      Nullable. Pre-signed S3 url to download the query results CSV.
                      This url is available for a limited time. You may retrieve a new url by re-retrieving the status of this query.
                      Null if the query has not completed.
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: No execution found
        '500':
          description: Server error.  Try again.
      security:
        - vulnerabilities-auth1:
            - vulnerabilities-ro/read
      x-amazon-apigateway-request-validator: params-only
      x-amazon-apigateway-integration:
        type: aws_proxy
        uri: 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:VulnerabilityManagementQueryFinderFunction/invocations'
        httpMethod: POST
        passthroughBehavior: when_no_match
        contentHandling: CONVERT_TO_TEXT
    post:
      tags:
        - AWS Instances
      summary: Execute an AWS Instances query
      description: |
        Execute an AWS Instances query. Include optional POST body with filter criteria.

        By default, the api will wait up to 20 seconds for the database to respond.
        If the database succeeds in less than 20 seconds, a response with a link to the query results is returned with status "SUCCESS".
        If the database does not complete the query in under 20 seconds, a response with no results is returned with status "RUNNING".
        In this case, you must poll for the results using the query execution ID (endpoint provided in the next_link).

        The results of the query will not be included on the response body directly.
        Instead, the response body will contain a pre-signed S3 url from which you may download the results.
        This pre-signed url is available for a limited time. Re-run this endpoint with the same query execution id to retrieve a new pre-signed S3 url.
      operationId: executeAwsInstancesQuery
      requestBody:
        description: |
          Optional filter criteria. You may leave the post body empty to include no filter criteria.

          Searching by report date requires the format yyyy-MM-dd (ex. "2020-11-17")

          To search for ranges of numerical fields, use the following comparison operators:
          eq (equal), ne (not equal), lt (less than), gt (greater than), lte (less than or equal), gte (greater than or equal)

          By default async is set to false. This means the API will wait up to 20 seconds for a database response.
          You may set async to true if you want to get an immediate response from the API that will include a query execution id to poll for.
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                instances:
                  type: array
                  nullable: true
                  items:
                    type: string
                  example:
                    - i-01234
                    - i-56789
                    - i-02468
                    - i-13579
                  description: Not required. List of instance ids to search for.
                accounts:
                  type: array
                  items:
                    type: string
                  example:
                    - 012345678901
                    - 011235813213
                  description: Not required. List of account numbers to search for.
                regions:
                  type: array
                  nullable: true
                  items:
                    type: string
                  example:
                    - us-east-1
                    - eu-west-1
                  description: Not required. List of regions to search for.
                app_ids:
                  type: array
                  nullable: true
                  items:
                    type: string
                  example:
                    - SVC01234
                    - SVC02468
                    - SVC01359
                  description: Not required. List of t_AppID to search for.
                environments:
                  type: array
                  nullable: true
                  items:
                    type: string
                  example:
                    - dev
                    - qa
                    - prod
                  description: Not required. List of t_environment to search for.
                dcls:
                  type: array
                  nullable: true
                  items:
                    type: string
                  example:
                    - '1'
                    - dcl2
                  description: Not required. List of t_dcl to search for.
                instance_states:
                  type: array
                  nullable: true
                  items:
                    type: string
                    enum:
                      - RUNNING
                      - STOPPED
                  example:
                    - RUNNING
                  description: Not required. List of instance states to search for.
                patch_compliance_statuses:
                  type: array
                  nullable: true
                  items:
                    type: string
                    enum:
                      - COMPLIANT
                      - NON_COMPLIANT
                      - UNKNOWN
                  example:
                    - NON_COMPLIANT
                    - UNKNOWN
                  description: Not required. List of AWS SSM patch compliance statuses to search for.
                qualys_agent_statuses:
                  type: array
                  nullable: true
                  items:
                    type: string
                    enum:
                      - STATUS_ACTIVE
                      - STATUS_INACTIVE
                      - STATUS_NO_AGENT
                  example:
                    - STATUS_INACTIVE
                    - STATUS_NO_AGENT
                  description: Not required. List of Qualys agent statuses to search for.
                first_report_date:
                  type: string
                  nullable: true
                  format: date
                  example: 2020-09-08T00:00:00.000Z
                  description: Not required. Retrieve results for findings no earlier than this date. Format yyyy-MM-dd
                last_report_date:
                  type: string
                  nullable: true
                  format: date
                  example: 2020-09-08T00:00:00.000Z
                  description: Not required. Retrieve results for findings no later than this date. Format yyyy-MM-dd
                vuln_count:
                  type: integer
                  nullable: true
                  format: int32
                  minimum: 0
                  example: 100
                  description: |
                    Not required. Retrieve results with a vulnerabilities count equal to this number.
                    Set vuln_count_op to pick an operator different than equal.
                vuln_count_op:
                  type: string
                  nullable: true
                  enum:
                    - eq
                    - ne
                    - lt
                    - gt
                    - lte
                    - gte
                  example: gt
                  description: |
                    Not required. Used in combination with vuln_count.
                    Choose a comparison operator to use when filtering vuln_count.
                critical_count:
                  type: integer
                  nullable: true
                  format: int32
                  minimum: 0
                  example: 10
                  description: |
                    Not required. Retrieve results with a critical (CVSS >= 9) vulnerabilities count equal to this number.
                    Set critical_count_op to pick an operator different than equal.
                critical_count_op:
                  type: string
                  nullable: true
                  enum:
                    - eq
                    - ne
                    - lt
                    - gt
                    - lte
                    - gte
                  example: lt
                  description: |
                    Not required. Used in combination with critical_count.
                    Choose a comparison operator to use when filtering critical_count.
                high_count:
                  type: integer
                  nullable: true
                  format: int32
                  minimum: 0
                  example: 15
                  description: |
                    Not required. Retrieve results with a high (CVSS >= 8 and < 9) vulnerabilities count equal to this number.
                    Set high_count_op to pick an operator different than equal.
                high_count_op:
                  type: string
                  nullable: true
                  enum:
                    - eq
                    - ne
                    - lt
                    - gt
                    - lte
                    - gte
                  example: lte
                  description: |
                    Not required. Used in combination with high_count.
                    Choose a comparison operator to use when filtering high_count.
                med_count:
                  type: integer
                  nullable: true
                  format: int32
                  minimum: 0
                  example: 0
                  description: |
                    Not required. Retrieve results with a medium (CVSS >= 7 and < 8) vulnerabilities count equal to this number.
                    Set med_count_op to pick an operator different than equal.
                med_count_op:
                  type: string
                  nullable: true
                  enum:
                    - eq
                    - ne
                    - lt
                    - gt
                    - lte
                    - gte
                  example: ne
                  description: |
                    Not required. Used in combination with med_count.
                    Choose a comparison operator to use when filtering med_count.
                async:
                  type: boolean
                  nullable: true
                  example: false
                  description: |
                    Not required. Whether or not to run asynchronously (default false).
                    Even when this is set to false (default), if the database takes longer than 20 seconds to respond, 
                    the API will return the results as if run asynchronously and you must poll for the results. 
      responses:
        '202':
          description: Query execution started/completed.
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      query_execution_id:
                        type: string
                        format: uuid
                        example: 61842b40-305f-479c-a9d8-d1e1cf3cf951
                        description: Execution id. May be used to search for this query's status.
                      query_execution_status:
                        type: string
                        enum:
                          - QUEUED
                          - RUNNING
                          - SUCCEEDED
                          - FAILED
                          - CANCELLED
                        example: SUCCEEDED
                        description: Status of this query.
                      query_execution_start:
                        type: string
                        format: date-time
                        nullable: true
                        example: '2017-07-21T17:32:28Z'
                        description: Nullable. Timestamp for when this query began executing. Null if the query has not been started.
                      query_execution_end:
                        type: string
                        format: date-time
                        nullable: true
                        example: '2017-07-21T17:32:58Z'
                        description: Nullable. Timestamp for when this query finished executing. Null if the query has not completed.
                      query_results:
                        type: string
                        nullable: true
                        example: 'http://www.presigned.s3.url.com/2a64a95bf7c'
                        description: |
                          Nullable. Pre-signed S3 url to download the query results CSV.
                          This url is available for a limited time. You may retrieve a new url by re-retrieving the status of this query.
                          Null if the query has not completed.
                  - type: object
                    properties:
                      next_link:
                        type: string
                        example: 'https://<server>/vulnerabilities/aws/instances?query_execution_id=61842b40-305f-479c-a9d8-d1e1cf3cf951'
                        description: Link to use to poll for the status of this query. Used as a GET request.
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '500':
          description: Server error.  Try again.
      security:
        - vulnerabilities-auth1:
            - vulnerabilities-ro/read
      x-amazon-apigateway-integration:
        type: aws_proxy
        uri: 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:VulnerabilityManagementQueryExecutorFunction/invocations'
        httpMethod: POST
        passthroughBehavior: when_no_match
        contentHandling: CONVERT_TO_TEXT
  /aws/vulnerabilities:
    get:
      tags:
        - AWS Vulnerabilities
      summary: Find an AWS vulnerabilities query execution
      description: |
        Retrieve the status of an existing AWS Vulnerabilities query. Must use a valid query execution id of an existing query.
        Use this endpoint to poll for the results of a query until it completes (whether successful, cancelled, or failed).
        You may also use this endpoint to retrieve the results of a previously completed query so long as you have its valid query execution id.

        The results of the query will not be included on the response body directly.
        Instead, the response body will contain a pre-signed S3 url from which you may download the results.
        This pre-signed url is available for a limited time. Re-run this endpoint with the same query execution id to retrieve a new pre-signed S3 url.
      operationId: findAwsVulnerabilitiesQuery
      parameters:
        - name: query_execution_id
          in: query
          description: Unique identifier of an existing query
          schema:
            type: string
            format: uuid
            example: 61842b40-305f-479c-a9d8-d1e1cf3cf951
      responses:
        '200':
          description: 'Query execution found, status information included in the response body.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  query_execution_id:
                    type: string
                    format: uuid
                    example: 61842b40-305f-479c-a9d8-d1e1cf3cf951
                    description: Execution id. May be used to search for this query's status.
                  query_execution_status:
                    type: string
                    enum:
                      - QUEUED
                      - RUNNING
                      - SUCCEEDED
                      - FAILED
                      - CANCELLED
                    example: SUCCEEDED
                    description: Status of this query.
                  query_execution_start:
                    type: string
                    format: date-time
                    nullable: true
                    example: '2017-07-21T17:32:28Z'
                    description: Nullable. Timestamp for when this query began executing. Null if the query has not been started.
                  query_execution_end:
                    type: string
                    format: date-time
                    nullable: true
                    example: '2017-07-21T17:32:58Z'
                    description: Nullable. Timestamp for when this query finished executing. Null if the query has not completed.
                  query_results:
                    type: string
                    nullable: true
                    example: 'http://www.presigned.s3.url.com/2a64a95bf7c'
                    description: |
                      Nullable. Pre-signed S3 url to download the query results CSV.
                      This url is available for a limited time. You may retrieve a new url by re-retrieving the status of this query.
                      Null if the query has not completed.
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: No execution found
        '500':
          description: Server error.  Try again.
      security:
        - vulnerabilities-auth1:
            - vulnerabilities-ro/read
      x-amazon-apigateway-request-validator: params-only
      x-amazon-apigateway-integration:
        type: aws_proxy
        uri: 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:VulnerabilityManagementQueryFinderFunction/invocations'
        httpMethod: POST
        passthroughBehavior: when_no_match
        contentHandling: CONVERT_TO_TEXT
    post:
      tags:
        - AWS Vulnerabilities
      summary: Execute an AWS Vulnerabilities query
      description: |
        Execute an AWS Vulnerabilities query. Include optional POST body with filter criteria.

        By default, the api will wait up to 20 seconds for the database to respond.
        If the database succeeds in less than 20 seconds, a response with a link to the query results is returned with status "SUCCESS".
        If the database does not complete the query in under 20 seconds, a response with no results is returned with status "RUNNING".
        In this case, you must poll for the results using the query execution ID (endpoint provided in the next_link).

        The results of the query will not be included on the response body directly.
        Instead, the response body will contain a pre-signed S3 url from which you may download the results.
        This pre-signed url is available for a limited time. Re-run this endpoint with the same query execution id to retrieve a new pre-signed S3 url.
      operationId: executeAwsVulnerabilitiesQuery
      requestBody:
        description: |
          Optional filter criteria. You may leave the post body empty to include no filter criteria.

          Searching by report date or found date requires the format yyyy-MM-dd (ex. "2020-11-17")

          To search for ranges of numerical fields, use the following comparison operators:
          eq (equal), ne (not equal), lt (less than), gt (greater than), lte (less than or equal), gte (greater than or equal)

          By default async is set to false. This means the API will wait up to 20 seconds for a database response.
          You may set async to true if you want to get an immediate response from the API that will include a query execution id to poll for.
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                accounts:
                  type: array
                  items:
                    type: string
                  example:
                    - 012345678901
                    - 011235813213
                  description: Not required. List of accounts to search for.
                regions:
                  type: array
                  nullable: true
                  items:
                    type: string
                  example:
                    - us-east-1
                    - eu-west-1
                  description: Not required. List of regions to search for.
                instances:
                  type: array
                  nullable: true
                  items:
                    type: string
                  example:
                    - i-01234
                    - i-56789
                    - i-02468
                    - i-13579
                  description: Not required. List of instance ids to search for.
                app_ids:
                  type: array
                  nullable: true
                  items:
                    type: string
                  example:
                    - SVC01234
                    - SVC02468
                    - SVC01359
                  description: Not required. List of t_AppID to search for.
                environments:
                  type: array
                  nullable: true
                  items:
                    type: string
                  example:
                    - dev
                    - qa
                    - prod
                  description: Not required. List of t_environment to search for.
                dcls:
                  type: array
                  nullable: true
                  items:
                    type: string
                  example:
                    - '1'
                    - dcl2
                  description: Not required. List of t_dcl to search for.
                instance_states:
                  type: array
                  nullable: true
                  items:
                    type: string
                    enum:
                      - RUNNING
                      - STOPPED
                  example:
                    - RUNNING
                  description: Not required. List of instance states to search for.
                auto_scaling_groups:
                  type: array
                  nullable: true
                  items:
                    type: string
                  example:
                    - asg-1
                    - asg-2
                  description: Not required. List of auto scaling group names to search for.
                private_ips:
                  type: array
                  nullable: true
                  items:
                    type: string
                  example:
                    - 10.071.811.16
                    - 10.24.391.03
                  description: Not required. List of private ips to search for.
                public_ips:
                  type: array
                  nullable: true
                  items:
                    type: string
                  example:
                    - 92.84.79.70
                    - 145.190.58.85
                  description: Not required. List of public ips to search for.
                dns:
                  type: array
                  nullable: true
                  items:
                    type: string
                  example:
                    - ip-92-84-79-70.abc.domain.com
                    - ip-145-190-58-85.abc.domain.com
                  description: Not required. List of dns addresses to search for.
                ec2_image_ids:
                  type: array
                  nullable: true
                  items:
                    type: string
                  example:
                    - ami-9c31919943ac7db0
                    - ami-c47c0363
                  description: Not required. List of ec2 ami ids to search for.
                os:
                  type: array
                  nullable: true
                  items:
                    type: string
                  example:
                    - Amazon Linux 2018.03
                    - CentOS Linux 7.8.2003
                  description: Not required. List of operating systems to search for.
                patch_compliance_statuses:
                  type: array
                  nullable: true
                  items:
                    type: string
                    enum:
                      - COMPLIANT
                      - NON_COMPLIANT
                      - UNKNOWN
                  example:
                    - NON_COMPLIANT
                    - UNKNOWN
                  description: Not required. List of patch compliance status to search for.
                tracking_methods:
                  type: array
                  nullable: true
                  items:
                    type: string
                  example:
                    - AGENT
                  description: Not required. List of tracking methods to search for.
                qualys_agent_statuses:
                  type: array
                  nullable: true
                  items:
                    type: string
                    enum:
                      - STATUS_ACTIVE
                      - STATUS_INACTIVE
                      - STATUS_NO_AGENT
                  example:
                    - STATUS_INACTIVE
                    - STATUS_NO_AGENT
                  description: Not required. List of qualys agent statuses to search for.
                qids:
                  type: array
                  nullable: true
                  items:
                    type: integer
                  example:
                    - 916128
                    - 2227987
                  description: Not required. List of Qualys vulnerability IDs (qids) to search for.
                vulnerability_types:
                  type: array
                  nullable: true
                  items:
                    type: string
                    enum:
                      - Info
                      - Confirmed
                      - Potential
                  example:
                    - Confirmed
                    - Potential
                  description: Not required. List of vulnerability types to search for.
                patchable:
                  type: boolean
                  nullable: true
                  example: true
                  description: Not required. Filter by patchable vulnerabilities.
                cvss:
                  type: integer
                  nullable: true
                  format: int32
                  minimum: 0
                  example: 9.1
                  description: |
                    Not required. Retrieve results with a vulnerability CVSS score equal to this number.
                    Set cvss_op to pick an operator different than equal.
                cvss_op:
                  type: string
                  nullable: true
                  enum:
                    - eq
                    - ne
                    - lt
                    - gt
                    - lte
                    - gte
                  example: ne
                  description: |
                    Not required. Used in combination with cvss.
                    Choose a comparison operator to use when filtering cvss.
                pci_flag:
                  type: integer
                  nullable: true
                  format: int32
                  enum:
                    - 0
                    - 1
                  example: 1
                  description: Not required. Filter by PCI flag.
                first_found_date:
                  type: string
                  nullable: true
                  format: date
                  example: 2020-09-08T00:00:00.000Z
                  description: Not required. Retrieve vulnerabilities discovered by Qualys no earlier than this date. Format yyyy-MM-dd
                last_found_date:
                  type: string
                  nullable: true
                  format: date
                  example: 2020-09-08T00:00:00.000Z
                  description: Not required. Retrieve vulnerabilities discovered by Qualys no later than this date. Format yyyy-MM-dd
                first_report_date:
                  type: string
                  nullable: true
                  format: date
                  example: 2020-09-08T00:00:00.000Z
                  description: Not required. Retrieve results for findings no earlier than this date. Format yyyy-MM-dd
                last_report_date:
                  type: string
                  nullable: true
                  format: date
                  example: 2020-09-08T00:00:00.000Z
                  description: Not required. Retrieve results for findings no later than this date. Format yyyy-MM-dd
                async:
                  type: boolean
                  nullable: true
                  example: false
                  description: |
                    Not required. Whether or not to run asynchronously (default false).
                    Even when this is set to false (default), if the database takes longer than 20 seconds to respond, 
                    the API will return the results as if run asynchronously and you must poll for the results. 
      responses:
        '202':
          description: Query execution started/completed.
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      query_execution_id:
                        type: string
                        format: uuid
                        example: 61842b40-305f-479c-a9d8-d1e1cf3cf951
                        description: Execution id. May be used to search for this query's status.
                      query_execution_status:
                        type: string
                        enum:
                          - QUEUED
                          - RUNNING
                          - SUCCEEDED
                          - FAILED
                          - CANCELLED
                        example: SUCCEEDED
                        description: Status of this query.
                      query_execution_start:
                        type: string
                        format: date-time
                        nullable: true
                        example: '2017-07-21T17:32:28Z'
                        description: Nullable. Timestamp for when this query began executing. Null if the query has not been started.
                      query_execution_end:
                        type: string
                        format: date-time
                        nullable: true
                        example: '2017-07-21T17:32:58Z'
                        description: Nullable. Timestamp for when this query finished executing. Null if the query has not completed.
                      query_results:
                        type: string
                        nullable: true
                        example: 'http://www.presigned.s3.url.com/2a64a95bf7c'
                        description: |
                          Nullable. Pre-signed S3 url to download the query results CSV.
                          This url is available for a limited time. You may retrieve a new url by re-retrieving the status of this query.
                          Null if the query has not completed.
                  - type: object
                    properties:
                      next_link:
                        type: string
                        example: 'https://<server>/vulnerabilities/aws/vulnerabilities?query_execution_id=61842b40-305f-479c-a9d8-d1e1cf3cf951'
                        description: Link to use to poll for the status of this query. Used as a GET request.
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '500':
          description: Server error.  Try again.
      security:
        - vulnerabilities-auth1:
            - vulnerabilities-ro/read
      x-amazon-apigateway-integration:
        type: aws_proxy
        uri: 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:VulnerabilityManagementQueryExecutorFunction/invocations'
        httpMethod: POST
        passthroughBehavior: when_no_match
        contentHandling: CONVERT_TO_TEXT
  /aws/qualys-agent-coverage:
    get:
      tags:
        - AWS Qualys Agent Coverage
      summary: Find an AWS Qualys agent coverage query execution
      description: |
        Retrieve the status of an existing AWS Qualys Agent Coverage query. Must use a valid query execution id of an existing query.
        Use this endpoint to poll for the results of a query until it completes (whether successful, cancelled, or failed).
        You may also use this endpoint to retrieve the results of a previously completed query so long as you have its valid query execution id.

        The results of the query will not be included on the response body directly.
        Instead, the response body will contain a pre-signed S3 url from which you may download the results.
        This pre-signed url is available for a limited time. Re-run this endpoint with the same query execution id to retrieve a new pre-signed S3 url.
      operationId: findAwsQualysAgentCoverageQuery
      parameters:
        - name: query_execution_id
          in: query
          description: Unique identifier of an existing query
          schema:
            type: string
            format: uuid
            example: 61842b40-305f-479c-a9d8-d1e1cf3cf951
      responses:
        '200':
          description: 'Query execution found, status information included in the response body.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  query_execution_id:
                    type: string
                    format: uuid
                    example: 61842b40-305f-479c-a9d8-d1e1cf3cf951
                    description: Execution id. May be used to search for this query's status.
                  query_execution_status:
                    type: string
                    enum:
                      - QUEUED
                      - RUNNING
                      - SUCCEEDED
                      - FAILED
                      - CANCELLED
                    example: SUCCEEDED
                    description: Status of this query.
                  query_execution_start:
                    type: string
                    format: date-time
                    nullable: true
                    example: '2017-07-21T17:32:28Z'
                    description: Nullable. Timestamp for when this query began executing. Null if the query has not been started.
                  query_execution_end:
                    type: string
                    format: date-time
                    nullable: true
                    example: '2017-07-21T17:32:58Z'
                    description: Nullable. Timestamp for when this query finished executing. Null if the query has not completed.
                  query_results:
                    type: string
                    nullable: true
                    example: 'http://www.presigned.s3.url.com/2a64a95bf7c'
                    description: |
                      Nullable. Pre-signed S3 url to download the query results CSV.
                      This url is available for a limited time. You may retrieve a new url by re-retrieving the status of this query.
                      Null if the query has not completed.
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: No execution found
        '500':
          description: Server error.  Try again.
      security:
        - vulnerabilities-auth1:
            - vulnerabilities-ro/read
      x-amazon-apigateway-request-validator: params-only
      x-amazon-apigateway-integration:
        type: aws_proxy
        uri: 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:VulnerabilityManagementQueryFinderFunction/invocations'
        httpMethod: POST
        passthroughBehavior: when_no_match
        contentHandling: CONVERT_TO_TEXT
    post:
      tags:
        - AWS Qualys Agent Coverage
      summary: Execute an AWS Qualys Agent Coverage query
      description: |
        Execute an AWS Qualys Agent Coverage query. Include optional POST body with filter criteria.

        By default, the api will wait up to 20 seconds for the database to respond.
        If the database succeeds in less than 20 seconds, a response with a link to the query results is returned with status "SUCCESS".
        If the database does not complete the query in under 20 seconds, a response with no results is returned with status "RUNNING".
        In this case, you must poll for the results using the query execution ID (endpoint provided in the next_link).

        The results of the query will not be included on the response body directly.
        Instead, the response body will contain a pre-signed S3 url from which you may download the results.
        This pre-signed url is available for a limited time. Re-run this endpoint with the same query execution id to retrieve a new pre-signed S3 url.
      operationId: executeAwsQualysAgentCoverageQuery
      requestBody:
        description: |
          Optional request settings. You may leave this empty.

          By default async is set to false. This means the API will wait up to 20 seconds for a database response.
          You may set async to true if you want to get an immediate response from the API that will include a query execution id to poll for.
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                async:
                  type: boolean
                  nullable: true
                  example: false
                  description: |
                    Not required. Whether or not to run asynchronously (default false).
                    Even when this is set to false (default), if the database takes longer than 20 seconds to respond, 
                    the API will return the results as if run asynchronously and you must poll for the results. 
      responses:
        '202':
          description: Query execution started/completed.
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      query_execution_id:
                        type: string
                        format: uuid
                        example: 61842b40-305f-479c-a9d8-d1e1cf3cf951
                        description: Execution id. May be used to search for this query's status.
                      query_execution_status:
                        type: string
                        enum:
                          - QUEUED
                          - RUNNING
                          - SUCCEEDED
                          - FAILED
                          - CANCELLED
                        example: SUCCEEDED
                        description: Status of this query.
                      query_execution_start:
                        type: string
                        format: date-time
                        nullable: true
                        example: '2017-07-21T17:32:28Z'
                        description: Nullable. Timestamp for when this query began executing. Null if the query has not been started.
                      query_execution_end:
                        type: string
                        format: date-time
                        nullable: true
                        example: '2017-07-21T17:32:58Z'
                        description: Nullable. Timestamp for when this query finished executing. Null if the query has not completed.
                      query_results:
                        type: string
                        nullable: true
                        example: 'http://www.presigned.s3.url.com/2a64a95bf7c'
                        description: |
                          Nullable. Pre-signed S3 url to download the query results CSV.
                          This url is available for a limited time. You may retrieve a new url by re-retrieving the status of this query.
                          Null if the query has not completed.
                  - type: object
                    properties:
                      next_link:
                        type: string
                        example: 'https://<server>/vulnerabilities/aws/qualys-agent-coverage?query_execution_id=61842b40-305f-479c-a9d8-d1e1cf3cf951'
                        description: Link to use to poll for the status of this query. Used as a GET request.
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '500':
          description: Server error.  Try again.
      security:
        - vulnerabilities-auth1:
            - vulnerabilities-ro/read
      x-amazon-apigateway-integration:
        type: aws_proxy
        uri: 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:VulnerabilityManagementQueryExecutorFunction/invocations'
        httpMethod: POST
        passthroughBehavior: when_no_match
        contentHandling: CONVERT_TO_TEXT
  /aws/sre-x/vulnerabilities:
    get:
      tags:
        - SRE Team X
      summary: Find a SRE team X vulnerabilities query execution
      description: |
        Retrieve the status of an existing SRE team X Vulnerabilities query. Must use a valid query execution id of an existing query.
        Use this endpoint to poll for the results of a query until it completes (whether successful, cancelled, or failed).
        You may also use this endpoint to retrieve the results of a previously completed query so long as you have its valid query execution id.

        The results of the query will not be included on the response body directly.
        Instead, the response body will contain a pre-signed S3 url from which you may download the results.
        This pre-signed url is available for a limited time. Re-run this endpoint with the same query execution id to retrieve a new pre-signed S3 url.
      operationId: findSreXVulnerabilitiesQuery
      parameters:
        - name: query_execution_id
          in: query
          description: Unique identifier of an existing query
          schema:
            type: string
            format: uuid
            example: 61842b40-305f-479c-a9d8-d1e1cf3cf951
      responses:
        '200':
          description: 'Query execution found, status information included in the response body.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  query_execution_id:
                    type: string
                    format: uuid
                    example: 61842b40-305f-479c-a9d8-d1e1cf3cf951
                    description: Execution id. May be used to search for this query's status.
                  query_execution_status:
                    type: string
                    enum:
                      - QUEUED
                      - RUNNING
                      - SUCCEEDED
                      - FAILED
                      - CANCELLED
                    example: SUCCEEDED
                    description: Status of this query.
                  query_execution_start:
                    type: string
                    format: date-time
                    nullable: true
                    example: '2017-07-21T17:32:28Z'
                    description: Nullable. Timestamp for when this query began executing. Null if the query has not been started.
                  query_execution_end:
                    type: string
                    format: date-time
                    nullable: true
                    example: '2017-07-21T17:32:58Z'
                    description: Nullable. Timestamp for when this query finished executing. Null if the query has not completed.
                  query_results:
                    type: string
                    nullable: true
                    example: 'http://www.presigned.s3.url.com/2a64a95bf7c'
                    description: |
                      Nullable. Pre-signed S3 url to download the query results CSV.
                      This url is available for a limited time. You may retrieve a new url by re-retrieving the status of this query.
                      Null if the query has not completed.
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: No execution found
        '500':
          description: Server error.  Try again.
      security:
        - vulnerabilities-auth1:
            - vulnerabilities-ro/read
            - vulnerabilities-sre-x/read
      x-amazon-apigateway-request-validator: params-only
      x-amazon-apigateway-integration:
        type: aws_proxy
        uri: 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:VulnerabilityManagementQueryFinderFunction/invocations'
        httpMethod: POST
        passthroughBehavior: when_no_match
        contentHandling: CONVERT_TO_TEXT
    post:
      tags:
        - SRE Team X
      summary: Execute a SRE team X Vulnerabilities query
      description: |
        Execute a SRE team X Vulnerabilities query.

        By default, the api will wait up to 20 seconds for the database to respond.
        If the database succeeds in less than 20 seconds, a response with a link to the query results is returned with status "SUCCESS".
        If the database does not complete the query in under 20 seconds, a response with no results is returned with status "RUNNING".
        In this case, you must poll for the results using the query execution ID (endpoint provided in the next_link).

        The results of the query will not be included on the response body directly.
        Instead, the response body will contain a pre-signed S3 url from which you may download the results.
        This pre-signed url is available for a limited time. Re-run this endpoint with the same query execution id to retrieve a new pre-signed S3 url.
      operationId: executeSreXVulnerabilitiesQuery
      requestBody:
        description: |
          Optional request settings. You may leave this empty.

          By default async is set to false. This means the API will wait up to 20 seconds for a database response.
          You may set async to true if you want to get an immediate response from the API that will include a query execution id to poll for.
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                async:
                  type: boolean
                  nullable: true
                  example: false
                  description: |
                    Not required. Whether or not to run asynchronously (default false).
                    Even when this is set to false (default), if the database takes longer than 20 seconds to respond, 
                    the API will return the results as if run asynchronously and you must poll for the results. 
      responses:
        '202':
          description: Query execution started/completed.
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      query_execution_id:
                        type: string
                        format: uuid
                        example: 61842b40-305f-479c-a9d8-d1e1cf3cf951
                        description: Execution id. May be used to search for this query's status.
                      query_execution_status:
                        type: string
                        enum:
                          - QUEUED
                          - RUNNING
                          - SUCCEEDED
                          - FAILED
                          - CANCELLED
                        example: SUCCEEDED
                        description: Status of this query.
                      query_execution_start:
                        type: string
                        format: date-time
                        nullable: true
                        example: '2017-07-21T17:32:28Z'
                        description: Nullable. Timestamp for when this query began executing. Null if the query has not been started.
                      query_execution_end:
                        type: string
                        format: date-time
                        nullable: true
                        example: '2017-07-21T17:32:58Z'
                        description: Nullable. Timestamp for when this query finished executing. Null if the query has not completed.
                      query_results:
                        type: string
                        nullable: true
                        example: 'http://www.presigned.s3.url.com/2a64a95bf7c'
                        description: |
                          Nullable. Pre-signed S3 url to download the query results CSV.
                          This url is available for a limited time. You may retrieve a new url by re-retrieving the status of this query.
                          Null if the query has not completed.
                  - type: object
                    properties:
                      next_link:
                        type: string
                        example: 'https://<server>/vulnerabilities/aws/sre-x/vulnerabilities?query_execution_id=61842b40-305f-479c-a9d8-d1e1cf3cf951'
                        description: Link to use to poll for the status of this query. Used as a GET request.
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '500':
          description: Server error.  Try again.
      security:
        - vulnerabilities-auth1:
            - vulnerabilities-ro/read
            - vulnerabilities-sre-x/read
      x-amazon-apigateway-integration:
        type: aws_proxy
        uri: 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:VulnerabilityManagementQueryExecutorFunction/invocations'
        httpMethod: POST
        passthroughBehavior: when_no_match
        contentHandling: CONVERT_TO_TEXT
  /aws/vpd:
    get:
      tags:
        - AWS VPD
      summary: Find an AWS VPD information query execution
      description: |
        Retrieve the status of an existing AWS VPD information query. Must use a valid query execution id of an existing query.
        Use this endpoint to poll for the results of a query until it completes (whether successful, cancelled, or failed).
        You may also use this endpoint to retrieve the results of a previously completed query so long as you have its valid query execution id.

        The results of the query will not be included on the response body directly.
        Instead, the response body will contain a pre-signed S3 url from which you may download the results.
        This pre-signed url is available for a limited time. Re-run this endpoint with the same query execution id to retrieve a new pre-signed S3 url.
      operationId: findAwsVpdQuery
      parameters:
        - name: query_execution_id
          in: query
          description: Unique identifier of an existing query
          schema:
            type: string
            format: uuid
            example: 61842b40-305f-479c-a9d8-d1e1cf3cf951
      responses:
        '200':
          description: 'Query execution found, status information included in the response body.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  query_execution_id:
                    type: string
                    format: uuid
                    example: 61842b40-305f-479c-a9d8-d1e1cf3cf951
                    description: Execution id. May be used to search for this query's status.
                  query_execution_status:
                    type: string
                    enum:
                      - QUEUED
                      - RUNNING
                      - SUCCEEDED
                      - FAILED
                      - CANCELLED
                    example: SUCCEEDED
                    description: Status of this query.
                  query_execution_start:
                    type: string
                    format: date-time
                    nullable: true
                    example: '2017-07-21T17:32:28Z'
                    description: Nullable. Timestamp for when this query began executing. Null if the query has not been started.
                  query_execution_end:
                    type: string
                    format: date-time
                    nullable: true
                    example: '2017-07-21T17:32:58Z'
                    description: Nullable. Timestamp for when this query finished executing. Null if the query has not completed.
                  query_results:
                    type: string
                    nullable: true
                    example: 'http://www.presigned.s3.url.com/2a64a95bf7c'
                    description: |
                      Nullable. Pre-signed S3 url to download the query results CSV.
                      This url is available for a limited time. You may retrieve a new url by re-retrieving the status of this query.
                      Null if the query has not completed.
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: No execution found
        '500':
          description: Server error.  Try again.
      security:
        - vulnerabilities-auth1:
            - vulnerabilities-ro/read
      x-amazon-apigateway-request-validator: params-only
      x-amazon-apigateway-integration:
        type: aws_proxy
        uri: 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:VulnerabilityManagementQueryFinderFunction/invocations'
        httpMethod: POST
        passthroughBehavior: when_no_match
        contentHandling: CONVERT_TO_TEXT
    post:
      tags:
        - AWS VPD
      summary: Execute an AWS VPD query
      description: |
        Execute an AWS VPD query. Include optional POST body with filter criteria.

        By default, the api will wait up to 20 seconds for the database to respond.
        If the database succeeds in less than 20 seconds, a response with a link to the query results is returned with status "SUCCESS".
        If the database does not complete the query in under 20 seconds, a response with no results is returned with status "RUNNING".
        In this case, you must poll for the results using the query execution ID (endpoint provided in the next_link).

        The results of the query will not be included on the response body directly.
        Instead, the response body will contain a pre-signed S3 url from which you may download the results.
        This pre-signed url is available for a limited time. Re-run this endpoint with the same query execution id to retrieve a new pre-signed S3 url.
      operationId: executeAwsVpdQuery
      requestBody:
        description: |
          Optional request settings. You may leave this empty.

          By default async is set to false. This means the API will wait up to 20 seconds for a database response.
          You may set async to true if you want to get an immediate response from the API that will include a query execution id to poll for.
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                async:
                  type: boolean
                  nullable: true
                  example: false
                  description: |
                    Not required. Whether or not to run asynchronously (default false).
                    Even when this is set to false (default), if the database takes longer than 20 seconds to respond, 
                    the API will return the results as if run asynchronously and you must poll for the results. 
      responses:
        '202':
          description: Query execution started/completed.
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      query_execution_id:
                        type: string
                        format: uuid
                        example: 61842b40-305f-479c-a9d8-d1e1cf3cf951
                        description: Execution id. May be used to search for this query's status.
                      query_execution_status:
                        type: string
                        enum:
                          - QUEUED
                          - RUNNING
                          - SUCCEEDED
                          - FAILED
                          - CANCELLED
                        example: SUCCEEDED
                        description: Status of this query.
                      query_execution_start:
                        type: string
                        format: date-time
                        nullable: true
                        example: '2017-07-21T17:32:28Z'
                        description: Nullable. Timestamp for when this query began executing. Null if the query has not been started.
                      query_execution_end:
                        type: string
                        format: date-time
                        nullable: true
                        example: '2017-07-21T17:32:58Z'
                        description: Nullable. Timestamp for when this query finished executing. Null if the query has not completed.
                      query_results:
                        type: string
                        nullable: true
                        example: 'http://www.presigned.s3.url.com/2a64a95bf7c'
                        description: |
                          Nullable. Pre-signed S3 url to download the query results CSV.
                          This url is available for a limited time. You may retrieve a new url by re-retrieving the status of this query.
                          Null if the query has not completed.
                  - type: object
                    properties:
                      next_link:
                        type: string
                        example: 'https://<server>/vulnerabilities/aws/vpd?query_execution_id=61842b40-305f-479c-a9d8-d1e1cf3cf951'
                        description: Link to use to poll for the status of this query. Used as a GET request.
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '500':
          description: Server error.  Try again.
      security:
        - vulnerabilities-auth1:
            - vulnerabilities-ro/read
      x-amazon-apigateway-integration:
        type: aws_proxy
        uri: 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:VulnerabilityManagementQueryExecutorFunction/invocations'
        httpMethod: POST
        passthroughBehavior: when_no_match
        contentHandling: CONVERT_TO_TEXT
  /:
    get:
      summary: API landing page
      operationId: APILandingPage
      responses:
        '200':
          description: Default 200 response
          headers:
            Content-Type:
              schema:
                type: string
            Access-Control-Allow-Origin:
              schema:
                type: string
            Access-Control-Allow-Methods:
              schema:
                type: string
            Access-Control-Allow-Headers:
              schema:
                type: string
          content: {}
      x-amazon-apigateway-integration:
        responses:
          default:
            statusCode: '200'
            responseParameters:
              method.response.header.Content-Type: '''text/html'''
              method.response.header.Access-Control-Allow-Headers: '''Content-Type,Authorization,X-Amz-Date,X-Api-Key,X-Amz-Security-Token'''
              method.response.header.Access-Control-Allow-Methods: '''*'''
              method.response.header.Access-Control-Allow-Origin: '''*'''
            responseTemplates:
              text/html: |
                <!DOCTYPE html> <html lang="en">
                  <head>
                    <meta charset="utf-8"> <!-- Important: rapi-doc uses utf8 charecters -->
                    <script type="module" src="https://unpkg.com/rapidoc/dist/rapidoc-min.js"></script>
                    <title>PCM Vulnerabilities API</title/
                  </head>
                  <body>
                    <rapi-doc spec-url = "https://downloads.pearsoncloudmanagement.com/vulnerabilities/$context.stage/api/openapi_bundled_v0.3.0.yaml"> </rapi-doc>
                  </body>
                </html>
        requestTemplates:
          application/json: '{"statusCode": 200}'
        passthroughBehavior: when_no_match
        type: mock
components:
  securitySchemes:
    vulnerabilities-auth1:
      type: apiKey
      name: Authorization
      in: header
      x-amazon-apigateway-authtype: cognito_user_pools
      x-amazon-apigateway-authorizer:
        providerARNs:
          - 'Fn::FindInMap':
              - Accounts
              - Ref: 'AWS::AccountId'
              - UserPoolArn
        type: cognito_user_pools
