IBM Cloud VPC API

The IBM Cloud VPC API enables programmatic provisioning and management of virtual server instances, networks, storage volumes, load balancers, security groups, and other infrastructure resources within an isolated virtual network on IBM Cloud.

OpenAPI Specification

ibm-vpc-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: International Business Machines IBM Cloud VPC API
  description: >-
    The IBM Cloud Virtual Private Cloud (VPC) API enables you to programmatically
    provision and manage virtual server instances, networks, storage volumes,
    load balancers, security groups, and other infrastructure resources within
    an isolated virtual network on IBM Cloud.
  version: 2.0.0
  contact:
    name: IBM Cloud
    url: https://cloud.ibm.com/apidocs/vpc/latest
  license:
    name: IBM Cloud Terms
    url: https://www.ibm.com/terms
servers:
  - url: https://us-south.iaas.cloud.ibm.com
    description: US South (Dallas)
  - url: https://eu-de.iaas.cloud.ibm.com
    description: EU Central (Frankfurt)
paths:
  /v1/vpcs:
    get:
      operationId: listVpcs
      summary: International Business Machines List VPCs
      description: List all VPCs in the region.
      tags:
        - VPCs
      parameters:
        - name: version
          in: query
          required: true
          schema:
            type: string
        - name: generation
          in: query
          required: true
          schema:
            type: integer
            enum:
              - 2
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  vpcs:
                    type: array
                    items:
                      $ref: '#/components/schemas/VPC'
    post:
      operationId: createVpc
      summary: International Business Machines Create a VPC
      description: Create a new VPC.
      tags:
        - VPCs
      parameters:
        - name: version
          in: query
          required: true
          schema:
            type: string
        - name: generation
          in: query
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                address_prefix_management:
                  type: string
                resource_group:
                  type: object
                  properties:
                    id:
                      type: string
      responses:
        '201':
          description: VPC created
  /v1/instances:
    get:
      operationId: listInstances
      summary: International Business Machines List instances
      description: List all virtual server instances in the region.
      tags:
        - Instances
      parameters:
        - name: version
          in: query
          required: true
          schema:
            type: string
        - name: generation
          in: query
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Successful response
    post:
      operationId: createInstance
      summary: International Business Machines Create an instance
      description: Create a new virtual server instance.
      tags:
        - Instances
      parameters:
        - name: version
          in: query
          required: true
          schema:
            type: string
        - name: generation
          in: query
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateInstanceRequest'
      responses:
        '201':
          description: Instance created
  /v1/subnets:
    get:
      operationId: listSubnets
      summary: International Business Machines List subnets
      description: List all subnets in the region.
      tags:
        - Subnets
      parameters:
        - name: version
          in: query
          required: true
          schema:
            type: string
        - name: generation
          in: query
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Successful response
  /v1/security_groups:
    get:
      operationId: listSecurityGroups
      summary: International Business Machines List security groups
      description: List all security groups in the region.
      tags:
        - Security Groups
      parameters:
        - name: version
          in: query
          required: true
          schema:
            type: string
        - name: generation
          in: query
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Successful response
  /v1/volumes:
    get:
      operationId: listVolumes
      summary: International Business Machines List volumes
      description: List all block storage volumes in the region.
      tags:
        - Volumes
      parameters:
        - name: version
          in: query
          required: true
          schema:
            type: string
        - name: generation
          in: query
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Successful response
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: IAM Token
  schemas:
    VPC:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
        crn:
          type: string
        classic_access:
          type: boolean
        created_at:
          type: string
          format: date-time
        default_security_group:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
        resource_group:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
    CreateInstanceRequest:
      type: object
      required:
        - name
        - profile
        - vpc
        - primary_network_interface
        - image
        - zone
      properties:
        name:
          type: string
        profile:
          type: object
          properties:
            name:
              type: string
        vpc:
          type: object
          properties:
            id:
              type: string
        primary_network_interface:
          type: object
          properties:
            subnet:
              type: object
              properties:
                id:
                  type: string
        image:
          type: object
          properties:
            id:
              type: string
        zone:
          type: object
          properties:
            name:
              type: string
        keys:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
security:
  - bearerAuth: []
tags:
  - name: Instances
    description: Manage virtual server instances.
  - name: Security Groups
    description: Manage security groups.
  - name: Subnets
    description: Manage subnets.
  - name: Volumes
    description: Manage block storage volumes.
  - name: VPCs
    description: Manage Virtual Private Clouds.