Aptible Code Scan Results API

The CodeScanResults API from Aptible — 2 operation(s) for codescanresults.

OpenAPI Specification

aptible-codescanresults-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: support@aptible.com
  description: REST API for the core Aptible platform.
  title: Aptible API v1 Code Scan Results API
  version: v1
servers:
- url: '{baseUrl}'
  variables:
    baseUrl:
      default: https://api.aptible.com
      description: Override for local or test environments
security:
- token: []
tags:
- name: CodeScanResults
paths:
  /apps/{app_id}/code_scan_results:
    get:
      description: Returns a paginated list of code scan results for the specified app.
      operationId: ListCodeScanResultsForApp
      parameters:
      - description: app_id
        explode: false
        in: path
        name: app_id
        required: true
        schema:
          type: integer
        style: simple
      - description: Current page of paginated results
        explode: true
        in: query
        name: page
        required: false
        schema:
          type: integer
        style: form
      - description: Number of results to return per page
        explode: true
        in: query
        name: per_page
        required: false
        schema:
          type: integer
        style: form
      - description: 'When true, omits embedded resources from the response. Also triggered when the Prefer: no_sensitive_extras=true header is present.'
        explode: true
        in: query
        name: no_embed
        required: false
        schema:
          type: boolean
        style: form
      - description: When set to no_sensitive_extras=true, omits sensitive fields and embedded resources from the response.
        explode: false
        in: header
        name: Prefer
        required: false
        schema:
          enum:
          - no_sensitive_extras=true
          type: string
        style: simple
      responses:
        '200':
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/ListCodeScanResultsForApp_200_response'
          description: successful
        default:
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response. Often a 4xx or 5xx status code
      summary: list code_scan_results
      tags:
      - CodeScanResults
    post:
      description: Creates a new code scan result for the specified app.
      operationId: CreateCodeScanResult
      parameters:
      - description: app_id
        explode: false
        in: path
        name: app_id
        required: true
        schema:
          type: integer
        style: simple
      - description: 'When true, omits embedded resources from the response. Also triggered when the Prefer: no_sensitive_extras=true header is present.'
        explode: true
        in: query
        name: no_embed
        required: false
        schema:
          type: boolean
        style: form
      - description: When set to no_sensitive_extras=true, omits sensitive fields and embedded resources from the response.
        explode: false
        in: header
        name: Prefer
        required: false
        schema:
          enum:
          - no_sensitive_extras=true
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCodeScanResult_request'
      responses:
        '201':
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/code_scan_result'
          description: successful
        default:
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response. Often a 4xx or 5xx status code
      summary: create code_scan_result
      tags:
      - CodeScanResults
  /code_scan_results/{id}:
    delete:
      description: Deletes a code scan result by ID.
      operationId: DeleteCodeScanResult
      parameters:
      - description: id
        explode: false
        in: path
        name: id
        required: true
        schema:
          type: integer
        style: simple
      responses:
        '204':
          description: successful
        default:
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response. Often a 4xx or 5xx status code
      summary: delete code_scan_result
      tags:
      - CodeScanResults
    get:
      description: Returns the details of a specific code scan result by ID.
      operationId: GetCodeScanResult
      parameters:
      - description: id
        explode: false
        in: path
        name: id
        required: true
        schema:
          type: integer
        style: simple
      - description: 'When true, omits embedded resources from the response. Also triggered when the Prefer: no_sensitive_extras=true header is present.'
        explode: true
        in: query
        name: no_embed
        required: false
        schema:
          type: boolean
        style: form
      - description: When set to no_sensitive_extras=true, omits sensitive fields and embedded resources from the response.
        explode: false
        in: header
        name: Prefer
        required: false
        schema:
          enum:
          - no_sensitive_extras=true
          type: string
        style: simple
      responses:
        '200':
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/code_scan_result'
          description: successful
        default:
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response. Often a 4xx or 5xx status code
      summary: show code_scan_result
      tags:
      - CodeScanResults
components:
  schemas:
    error:
      properties:
        code:
          type: integer
        error:
          type: string
        message:
          type: string
      required:
      - code
      - error
      - message
      type: object
    ListCodeScanResultsForApp_200_response__links:
      properties:
        resource:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        next:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        prev:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        self:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
      type: object
    code_scan_result__links:
      properties:
        app:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        operation:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        self:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
      type: object
    ListCodeScanResultsForApp_200_response__embedded:
      properties:
        code_scan_results:
          items:
            $ref: '#/components/schemas/code_scan_result'
          type: array
      type: object
    CreateCodeScanResult_request:
      properties:
        operation:
          description: Alternate name for `operation_id`
          type: integer
        operation_id:
          type: integer
        dockerfile_present:
          type: boolean
        procfile_present:
          type: boolean
        aptible_yml_present:
          type: boolean
        git_ref:
          type: string
        git_commit:
          type: string
      required:
      - git_commit
      - git_ref
      - operation_id
      type: object
    ListCodeScanResultsForApp_200_response:
      properties:
        _embedded:
          $ref: '#/components/schemas/ListCodeScanResultsForApp_200_response__embedded'
        total_count:
          type: integer
        per_page:
          type: integer
        current_page:
          type: integer
        _links:
          $ref: '#/components/schemas/ListCodeScanResultsForApp_200_response__links'
      required:
      - _embedded
      - _links
      - current_page
      - per_page
      - total_count
      type: object
    code_scan_result:
      properties:
        id:
          type: integer
        dockerfile_present:
          type: boolean
        procfile_present:
          type: boolean
        aptible_yml_present:
          type: boolean
        _type:
          type: string
        created_at:
          format: dateTime
          type: string
        updated_at:
          format: dateTime
          type: string
        _links:
          $ref: '#/components/schemas/code_scan_result__links'
      required:
      - _type
      - aptible_yml_present
      - created_at
      - dockerfile_present
      - id
      - procfile_present
      - updated_at
    ListAccountsForStack_200_response__links_stack:
      properties:
        href:
          format: uri
          type: string
      type: object
  securitySchemes:
    token:
      in: header
      name: Authorization
      type: apiKey