Veracode API Credentials API

API credential lifecycle management

OpenAPI Specification

veracode-api-credentials-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Veracode Applications REST API Credentials API
  description: The Veracode Applications REST API provides programmatic access to application profiles, sandboxes, and policy evaluations in the Veracode Platform. Enables automation of portfolio management, compliance tracking, and CI/CD integration. Authentication uses HMAC with API ID/key credentials.
  version: 1.0.0
  contact:
    name: Veracode Support
    url: https://community.veracode.com/
  termsOfService: https://www.veracode.com/legal-notice
servers:
- url: https://api.veracode.com
  description: Veracode Commercial Region API
security:
- HmacAuth: []
tags:
- name: API Credentials
  description: API credential lifecycle management
paths:
  /api/authn/v2/api_credentials:
    post:
      operationId: generateApiCredentials
      summary: Generate API Credentials
      description: Generates new API credentials for the current user.
      tags:
      - API Credentials
      responses:
        '200':
          description: New API credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiCredentials'
        '401':
          $ref: '#/components/responses/Unauthorized'
    get:
      operationId: getApiCredentialExpiration
      summary: Get API Credential Expiration
      description: Returns the expiration date for the current user's API credentials.
      tags:
      - API Credentials
      responses:
        '200':
          description: Credential expiration details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiCredentialExpiration'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /api/authn/v2/api_credentials/{apiCredsId}:
    get:
      operationId: getApiCredentialById
      summary: Get API Credential
      description: Returns expiration details for a specific API credential.
      tags:
      - API Credentials
      parameters:
      - name: apiCredsId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Credential details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiCredentialExpiration'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: revokeApiCredentials
      summary: Revoke API Credentials
      description: Revokes a set of API credentials.
      tags:
      - API Credentials
      parameters:
      - name: apiCredsId
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Credentials revoked
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    Error:
      type: object
      properties:
        _status:
          type: string
        message:
          type: string
        http_code:
          type: integer
    ApiCredentials:
      type: object
      properties:
        api_id:
          type: string
          description: API ID for HMAC authentication
        api_secret_key:
          type: string
          description: API secret key (shown only once at creation)
        created:
          type: string
          format: date-time
        expiration_ts:
          type: string
          format: date-time
    ApiCredentialExpiration:
      type: object
      properties:
        api_id:
          type: string
        expiration_ts:
          type: string
          format: date-time
        expiration_status:
          type: string
          enum:
          - ACTIVE
          - EXPIRED
          - EXPIRING_SOON
  responses:
    Unauthorized:
      description: Missing or invalid HMAC credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    HmacAuth:
      type: http
      scheme: veracode_hmac
      description: HMAC authentication with Veracode API ID and key credentials