Render Disks API

[Disks](https://render.com/docs/disks) allow you to attach persistent storage to your services.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

render-disks-api-openapi.yml Raw ↑
openapi: 3.0.2
info:
  title: Render Public Audit Logs Disks API
  description: Manage everything about your Render services
  version: 1.0.0
  contact:
    name: Render API
    url: https://community.render.com
    email: support@render.com
servers:
- url: https://api.render.com/v1
security:
- BearerAuth: []
tags:
- name: Disks
  description: '[Disks](https://render.com/docs/disks) allow you to attach persistent storage to your services.

    '
paths:
  /disks:
    get:
      summary: List disks
      description: 'List persistent disks matching the provided filters. If no filters are provided, returns all disks you have permissions to view.

        '
      parameters:
      - $ref: '#/components/parameters/ownerIdParam'
      - name: diskId
        in: query
        description: Filter by disk IDs
        schema:
          type: array
          items:
            $ref: '#/paths/~1disks~1%7BdiskId%7D/parameters/0/schema'
      - $ref: '#/components/parameters/nameParam'
      - $ref: '#/components/parameters/createdBeforeParam'
      - $ref: '#/components/parameters/createdAfterParam'
      - $ref: '#/components/parameters/updatedBeforeParam'
      - $ref: '#/components/parameters/updatedAfterParam'
      - $ref: '#/components/parameters/serviceIdsParam'
      - $ref: '#/components/parameters/cursorParam'
      - $ref: '#/components/parameters/limitParam'
      operationId: list-disks
      tags:
      - Disks
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/diskWithCursor'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '406':
          $ref: '#/components/responses/406NotAcceptable'
        '410':
          $ref: '#/components/responses/410Gone'
        '429':
          $ref: '#/components/responses/429RateLimit'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      summary: Add disk
      description: 'Attach a persistent disk to a web service, private service, or background worker.


        The service must be redeployed for the disk to be attached.

        '
      operationId: add-disk
      tags:
      - Disks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              - sizeGB
              - mountPath
              - serviceId
              properties:
                name:
                  type: string
                sizeGB:
                  type: integer
                mountPath:
                  type: string
                serviceId:
                  type: string
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/diskWithCursor/properties/disk'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '406':
          $ref: '#/components/responses/406NotAcceptable'
        '410':
          $ref: '#/components/responses/410Gone'
        '429':
          $ref: '#/components/responses/429RateLimit'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /disks/{diskId}:
    parameters:
    - name: diskId
      in: path
      required: true
      description: The ID of the disk
      schema:
        type: string
        pattern: ^dsk-[0-9a-z]{20}$
        example: dsk-cph1rs3idesc73a2b2mg
    get:
      summary: Retrieve disk
      description: 'Retrieve the persistent disk with the provided ID.

        '
      operationId: retrieve-disk
      tags:
      - Disks
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/diskWithCursor/properties/disk'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '406':
          $ref: '#/components/responses/406NotAcceptable'
        '410':
          $ref: '#/components/responses/410Gone'
        '429':
          $ref: '#/components/responses/429RateLimit'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    patch:
      summary: Update disk
      description: 'Update the persistent disk with the provided ID.


        The disk''s associated service must be deployed and active for updates to take effect.


        When resizing a disk, the new size must be greater than the current size.

        '
      operationId: update-disk
      tags:
      - Disks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                sizeGB:
                  type: integer
                mountPath:
                  type: string
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/diskWithCursor/properties/disk'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '406':
          $ref: '#/components/responses/406NotAcceptable'
        '410':
          $ref: '#/components/responses/410Gone'
        '429':
          $ref: '#/components/responses/429RateLimit'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete disk
      description: 'Delete a persistent disk attached to a service.


        **All data on the disk will be lost.** The disk''s associated service will immediately lose access to it.

        '
      operationId: delete-disk
      tags:
      - Disks
      responses:
        '204':
          description: Disk deleted
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '406':
          $ref: '#/components/responses/406NotAcceptable'
        '410':
          $ref: '#/components/responses/410Gone'
        '429':
          $ref: '#/components/responses/429RateLimit'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /disks/{diskId}/snapshots:
    parameters:
    - name: diskId
      in: path
      required: true
      description: The ID of the disk
      schema:
        type: string
    get:
      summary: List snapshots
      description: 'List snapshots for the persistent disk with the provided ID. Each snapshot is a point-in-time copy of the disk''s data.

        '
      operationId: list-snapshots
      tags:
      - Disks
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/diskSnapshot'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '406':
          $ref: '#/components/responses/406NotAcceptable'
        '410':
          $ref: '#/components/responses/410Gone'
        '429':
          $ref: '#/components/responses/429RateLimit'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /disks/{diskId}/snapshots/restore:
    parameters:
    - name: diskId
      in: path
      required: true
      description: The ID of the disk
      schema:
        type: string
    post:
      summary: Restore snapshot
      description: 'Restore a persistent disk to an available snapshot.


        **This operation is irreversible.** It will overwrite the current disk data. It might also trigger a service deploy.


        Snapshot keys returned from the [List snapshots](https://api-docs.render.com/reference/list-snapshots) endpoint expire after 24 hours. If a snapshot key has expired, query the endpoint again for a new key.

        '
      operationId: restore-snapshot
      tags:
      - Disks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/snapshotRestorePOST'
      responses:
        '200':
          description: Restored
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/diskWithCursor/properties/disk'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '406':
          $ref: '#/components/responses/406NotAcceptable'
        '410':
          $ref: '#/components/responses/410Gone'
        '429':
          $ref: '#/components/responses/429RateLimit'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
components:
  responses:
    429RateLimit:
      description: Rate limit has been surpassed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    503ServiceUnavailable:
      description: Server currently unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    403Forbidden:
      description: You do not have permissions for the requested resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    500InternalServerError:
      description: An unexpected server error has occurred.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    404NotFound:
      description: Unable to find the requested resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    406NotAcceptable:
      description: Unable to generate preferred media types as specified by Accept request header.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    400BadRequest:
      description: The request could not be understood by the server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    401Unauthorized:
      description: Authorization information is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    410Gone:
      description: The requested resource is no longer available.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
  parameters:
    cursorParam:
      name: cursor
      in: query
      required: false
      description: The position in the result list to start from when fetching paginated results. For details, see [Pagination](https://api-docs.render.com/reference/pagination).
      schema:
        type: string
    createdBeforeParam:
      name: createdBefore
      in: query
      schema:
        type: string
        format: date-time
      required: false
      description: Filter for resources created before a certain time (specified as an ISO 8601 timestamp)
      example: '2021-06-17T08:15:30Z'
    updatedAfterParam:
      name: updatedAfter
      in: query
      schema:
        type: string
        format: date-time
      required: false
      description: Filter for resources updated after a certain time (specified as an ISO 8601 timestamp)
      example: '2021-06-17T08:15:30Z'
    ownerIdParam:
      name: ownerId
      in: query
      description: The ID of the workspaces to return resources for
      schema:
        type: array
        items:
          type: string
      style: form
      explode: false
      required: false
    limitParam:
      name: limit
      in: query
      required: false
      description: The maximum number of items to return. For details, see [Pagination](https://api-docs.render.com/reference/pagination).
      schema:
        type: integer
        default: 20
        minimum: 1
        maximum: 100
        description: Defaults to 20
    updatedBeforeParam:
      name: updatedBefore
      in: query
      schema:
        type: string
        format: date-time
      required: false
      description: Filter for resources updated before a certain time (specified as an ISO 8601 timestamp)
      example: '2021-06-17T08:15:30Z'
    serviceIdsParam:
      name: serviceId
      in: query
      description: Filter for resources by service ID
      schema:
        type: array
        items:
          type: string
      style: form
      required: false
    nameParam:
      name: name
      in: query
      schema:
        type: array
        items:
          type: string
      style: form
      explode: false
      required: false
      description: Filter by name
    createdAfterParam:
      name: createdAfter
      in: query
      schema:
        type: string
        format: date-time
      required: false
      description: Filter for resources created after a certain time (specified as an ISO 8601 timestamp)
      example: '2021-02-17T08:15:30Z'
  schemas:
    cursor:
      type: string
    diskWithCursor:
      required:
      - disk
      - cursor
      type: object
      properties:
        disk:
          type: object
          required:
          - id
          - name
          - sizeGB
          - mountPath
          - createdAt
          - updatedAt
          properties:
            id:
              $ref: '#/paths/~1disks~1%7BdiskId%7D/parameters/0/schema'
            name:
              type: string
            sizeGB:
              type: integer
            mountPath:
              type: string
            serviceId:
              type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
        cursor:
          $ref: '#/components/schemas/cursor'
    snapshotRestorePOST:
      type: object
      required:
      - snapshotKey
      properties:
        snapshotKey:
          type: string
        instanceId:
          $ref: '#/components/schemas/instanceId'
    error:
      type: object
      properties:
        id:
          type: string
        message:
          type: string
    instanceId:
      description: When a service with a disk is scaled, the instanceId is used to identify the instance that the disk is attached to. Each instance's disks get their own snapshots, and can be restored separately.
      type: string
    diskSnapshot:
      type: object
      properties:
        createdAt:
          type: string
          format: date-time
        snapshotKey:
          type: string
        instanceId:
          $ref: '#/components/schemas/instanceId'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
x-readme:
  metrics-enabled: false