Projects
A project is a set of named workflows, deployed together as one document.
Deploying a project
A project is a set of named workflows. Deploy them together as one document; each deploy creates a new version, and runs in progress stay on the version they started with. Deploying a document identical to the latest version creates nothing and returns that version.
await a22a.projects.deploy({
project: "acme",
workflows: {
summarise: { steps: [ … ] },
translate: { steps: [ … ] }
}
});
// { project: "acme", version: 2, workflows: ["summarise", "translate"] }The CLI builds the same document from a folder. A project is a folder under a22a/; each .json file in it is a workflow, named after the file.
a22a/
acme/
summarise.json
translate.jsonRetrieving a project
await a22a.projects.retrieve("acme");
// { id: "…", project: "acme", version: 2, manifest: { … } }retrieve returns the latest version. A run is queued on the latest version at the moment it is invoked. A workflow left out of the latest version can no longer be invoked.
Names
Project, workflow and step names are lowercase letters, digits and dashes, up to 32 characters, starting and ending with a letter or digit. A workflow's URL is built from its project and its name:
POST https://api.a22a.sh/v1/run/<project>/<workflow>