> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tinfoil.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Plan a project update

> Previews a project update per container without changing anything.



## OpenAPI

````yaml https://api.tinfoil.sh/openapi.yaml post /api/containers/projects/{id}/update/plan
openapi: 3.2.0
info:
  title: Tinfoil Controlplane API
  version: 0.1.0
  description: >-
    Manage inference API keys, read usage and invoices, and manage Tinfoil
    confidential containers, their configuration, and the organization resources
    they use. Authenticate with an admin API key sent as a bearer token.
servers:
  - url: https://api.tinfoil.sh
security:
  - apiKey: []
tags:
  - name: Account
    description: >-
      The identity and organization behind the API key, and the token usage and
      invoices of the personal account or organization.
  - name: API keys
    parent: Account
    description: Inference API keys of the personal account or organization.
  - name: Containers
    description: Create, deploy, and stop confidential containers.
  - name: Container updates
    description: >-
      Move a container to a new release, and promote or cancel an update that is
      held for review.
  - name: Projects
    description: Groups of containers deployed from the same config source.
  - name: Volumes
    description: Encrypted persistent volumes that attach to containers.
  - name: Secrets
    description: >-
      Organization secrets available to containers, and secrets scoped to a
      single GitHub repository.
  - name: Access
    description: >-
      SSH public keys for attested SSH access to containers, custom domains that
      route to containers, and credentials for pulling images from private
      registries. An organization can store one ecr and one custom registry
      connection, each identified by its hostname.
  - name: GitHub & models
    description: >-
      Repository config and image builds through the Tinfoil GitHub app, and
      packaging Hugging Face models for use in containers. Packaging models
      requires a GPU entitlement or model access for the organization.
  - name: Config registry
    description: >-
      Publish tinfoil-config.yml revisions, read published configs, and resolve
      the endorsements that let clients verify them.
  - name: Bunkers
    description: Bunker owner keys and owner attestation.
paths:
  /api/containers/projects/{id}/update/plan:
    post:
      tags:
        - Projects
      summary: Plan a project update
      description: Previews a project update per container without changing anything.
      operationId: planContainerProjectUpdate
      parameters:
        - name: id
          in: path
          required: true
          description: Project ID.
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContainerProjectUpdateRequest'
      responses:
        '200':
          description: Project update plan.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContainerProjectUpdatePlan'
        '400':
          $ref: '#/components/responses/Error'
          description: Bad request
        '401':
          $ref: '#/components/responses/Error'
          description: Unauthorized
        '403':
          $ref: '#/components/responses/Error'
          description: Forbidden
        '404':
          $ref: '#/components/responses/Error'
          description: Not found
      security:
        - apiKey:
            - containers.projects.update
components:
  schemas:
    ContainerProjectUpdateRequest:
      type: object
      required:
        - tag
      properties:
        tag:
          type: string
          minLength: 1
        hold:
          type:
            - boolean
            - 'null'
          description: >-
            Hold new versions for review. Omitted inherits the project's
            hold_by_default. An explicit value does not change the project
            setting.
        mark_latest_release:
          type:
            - boolean
            - 'null'
          description: >-
            Mark the tag as the GitHub latest release. Omitted means true. The
            tag is marked once each container serves production, or after
            promotion for held versions; applies only to non-debug containers
            whose repository is active and connected through the GitHub App.
        instance_ids:
          type:
            - array
            - 'null'
          description: >-
            Containers to update. Omitted or empty selects all of the project's
            containers.
          items:
            type: string
            format: uuid
        confirm_downtime:
          type: boolean
          description: Must be true when any selected container would be replaced.
    ContainerProjectUpdatePlan:
      type: object
      required:
        - read_only
        - project_id
        - latest_release_tag
        - eligible_count
        - skipped_count
        - failed_count
        - results
      properties:
        read_only:
          type: boolean
        project_id:
          type:
            - string
            - 'null'
          format: uuid
        latest_release_tag:
          type: string
          description: >-
            The repository's GitHub latest release tag, or empty when there is
            none.
        eligible_count:
          type: integer
          description: Number of planned results.
        skipped_count:
          type: integer
        failed_count:
          type: integer
        results:
          type: array
          items:
            type: object
            required:
              - instance_id
              - name
              - status
              - plan
              - error
            properties:
              instance_id:
                type: string
                format: uuid
              name:
                type: string
              status:
                type: string
                enum:
                  - planned
                  - skipped
                  - failed
              plan:
                oneOf:
                  - $ref: '#/components/schemas/ContainerUpdatePlan'
                  - type: 'null'
              error:
                type:
                  - string
                  - 'null'
    ContainerUpdatePlan:
      type: object
      required:
        - read_only
        - instance_id
        - name
        - current
        - target
        - update_strategy
        - downtime_required
        - hold
        - hold_source
        - hold_available
        - mark_latest_release
        - configuration_changes
        - volume_data
        - cost_estimate
      properties:
        secret_delivery:
          type: object
          description: >-
            Present only when the target configuration sets a keyserver URL. Its
            absence does not mean external secrets were verified.
          required:
            - mode
            - managed_secrets
            - external_secrets
            - external_secrets_verified
            - keyserver_ignored_in_debug
          properties:
            mode:
              type: string
              enum:
                - managed
                - private_keyserver
              description: >-
                private_keyserver for a non-debug target; managed for a debug
                target, which ignores the keyserver.
            managed_secrets:
              type: array
              description: >-
                Sorted managed secret names, equal to
                configuration_changes.secrets_refreshed; empty in
                private_keyserver mode.
              items:
                type: string
            external_secrets:
              type: array
              description: >-
                Secret names the container fetches from its private keyserver,
                sorted and deduplicated from the measured containers[].secrets,
                models[].key-secret, and volumes[].key-secret. Empty in managed
                mode.
              items:
                type: string
            external_secrets_verified:
              type: boolean
              description: Always false; planning does not contact the keyserver.
            keyserver_ignored_in_debug:
              type: boolean
              description: >-
                True when a debug target's config sets keyserver-url; delivery
                is then managed and not private.
        read_only:
          type: boolean
        instance_id:
          type: string
          format: uuid
        name:
          type: string
        current:
          $ref: '#/components/schemas/UpdatePlanResources'
        target:
          $ref: '#/components/schemas/UpdatePlanResources'
        update_strategy:
          type: string
          enum:
            - blue_green
            - replace
        downtime_required:
          type: boolean
        hold:
          type: boolean
        hold_source:
          type: string
          enum:
            - project
            - request
        hold_available:
          type: boolean
        mark_latest_release:
          type: boolean
        configuration_changes:
          type: object
          description: Names of changed items only, never values.
          required:
            - variables
            - secrets
            - ssh_keys
            - settings
            - secrets_refreshed
          properties:
            variables:
              $ref: '#/components/schemas/UpdatePlanKeyChanges'
            secrets:
              $ref: '#/components/schemas/UpdatePlanKeyChanges'
            ssh_keys:
              $ref: '#/components/schemas/UpdatePlanKeyChanges'
            settings:
              type: array
              description: Names of changed container settings.
              items:
                type: string
            secrets_refreshed:
              type: array
              description: >-
                Target secret names whose values are fetched fresh when the
                update runs.
              items:
                type: string
        volume_data:
          type: string
          description: What happens to persistent volume data; currently always "retained".
        target_host_name:
          type: string
          description: Host the container moves to, when the update is a move.
        cost_estimate:
          type: object
          description: >-
            available is false, with reason explaining why, when no estimate can
            be given.
          required:
            - available
            - reason
          properties:
            available:
              type: boolean
            reason:
              type: string
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
        code:
          type: string
          description: Stable machine-readable error code.
      additionalProperties: true
    UpdatePlanResources:
      type: object
      required:
        - tag
        - cpus
        - memory_mb
        - gpus
      properties:
        tag:
          type: string
        cpus:
          type: integer
        memory_mb:
          type:
            - integer
            - 'null'
        gpus:
          type: integer
    UpdatePlanKeyChanges:
      type: object
      required:
        - added
        - changed
        - removed
      properties:
        added:
          type: array
          items:
            type: string
        changed:
          type: array
          items:
            type: string
        removed:
          type: array
          items:
            type: string
  responses:
    Error:
      description: The request failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        An admin API key. Personal admin keys reach the API key, billing and
        Account endpoints for the creator's personal account; the other
        endpoints need an organization admin key. Security requirement entries
        list the permission a scoped key needs for the operation.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.