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

# Overview

> Understanding the App blob type.

The **App** Blob Type (`blobhub.package.app`) holds one app's compiled definition: the files of
[`app.yaml`](https://docs.blobhub.io/blob-types/app/app-yaml) and of each blob's [`blob.yaml`](https://docs.blobhub.io/blob-types/app/blob-yaml), as the build wrote
them. Nothing runs in an app blob. It is a store that an installer reads when an organization installs the app.

An app blob is filled by the command line, from the app's repository: `blobhub app build` compiles the sources and
`blobhub app push` makes the draft equal the build — see the [App commands](https://docs.blobhub.io/cli/app/overview.md), and
[Building an App](https://docs.blobhub.io/general/building-an-app.md) for the whole path with one example. It is not edited in the web.

## Revisions

Each revision holds the tree of files a developer sees in `build/`: `app.yaml`, one folder per blob with its
`blob.yaml` and definitions, and `schemas/`. The app's `README.md` and `LICENSE` are the revision's Readme and License,
which `blobhub app push` writes as revision metadata, not as files. A path is relative and made of segments of
`A`-`Z`, `a`-`z`, `0`-`9`, `.`, `_` and `-`, at most 256 characters. A file is at most 4 MiB and a revision holds at
most 500 files; both bounds are fixed.

| Revision | What it is |
| :- | :- |
| Draft | The revision `blobhub app push` uploads to. Files are put and deleted until it is committed. |
| Version | A committed revision. It never changes again. |

## Versions

A **version** is a committed revision, named by its `app.version` — `0.2.0` in the Field Reports example. The name is
unique within the blob: committing a revision whose `app.version` the blob already holds is refused. A version is never
reopened, so an installation made from `0.2.0` is made from the same files whenever it is read.

`app.version` is a semantic version ([App](https://docs.blobhub.io/blob-types/app/app-yaml.md#app)), so `draft` is never one. Versions compare by
semantic-version precedence, and the newest version is the highest. The commit route refuses in three ways:

| Status | Error | Cause |
| :- | :- | :- |
| 400 | `invalid_app` | [`describe`](https://docs.blobhub.io/blob-types/app/operations/describe) reports problems; the body carries them as `problems`. |
| 409 | `version_in_use` | A committed revision of the blob already holds this `app.version`. |
| 503 | `renderer_unavailable` | `describe` could not reach the platform's template renderer. Nothing was committed; commit again. |

The reopen route refuses every version with 409 `revision_not_writable`: commit the next version instead.

[`describe`](https://docs.blobhub.io/blob-types/app/operations/describe) is the platform reading the definition: the app, its blobs, its
inputs and every problem found. The commit route runs it, and refuses to commit while it reports a problem.

## Access

| Action | Needs |
| :- | :- |
| Push, commit | WRITE on the app blob |
| Share it | ADMIN on the app blob |
| Change its visibility | WRITE on the app blob, by a person (not a service account's key) |
| See the app, its files and its versions | The app blob is public, or the caller is a member of it or of its organization |

Members are users: people and service accounts. A private app is shared by adding a person, or a service account, as a
member with READ; that user may install the app wherever they may install. Losing access stops upgrades and nothing
else — an installation holds its own copy and keeps working.

## Commands

Every command is a `POST` to `/revisions/:id/data/command` (writes) or `/revisions/:id/data/query` (reads).

| Command | Reads or writes | Description |
| :- | :- | :- |
| [`put_file`](https://docs.blobhub.io/blob-types/app/operations/put-file) | Writes; a draft only | Put one file at a path. |
| [`list_files`](https://docs.blobhub.io/blob-types/app/operations/list-files) | Reads | List the revision's files with size and checksum. |
| [`get_file`](https://docs.blobhub.io/blob-types/app/operations/get-file) | Reads | Read one file. |
| [`delete_file`](https://docs.blobhub.io/blob-types/app/operations/delete-file) | Writes; a draft only | Delete one file. |
| [`describe`](https://docs.blobhub.io/blob-types/app/operations/describe) | Reads | Read the definition: app, blobs, inputs, problems. |

A write to a committed revision is refused with `revision_not_writable`. `put_file` takes the file's bytes as its body;
`get_file` answers the bytes.


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