The project resource

string
A lowercase ULID. It sorts by creation time.
string
Up to 255 characters. Required on create. Names need not be unique.
string | null
Up to 2000 characters.
string
The processing build the project runs. Chosen at creation (your account’s default unless you name one) and kept until you change it. See Builds.
"running" | "stopped" | "error"
Whether the processing service is up. error means the last launch failed, or the service started and then stopped working (pod in GET …/status); POST …/start retries it.
object | null
How many input files are in each state, as last counted (countedAt): the same counts as meta of GET …/files, kept on the project so that a list of projects shows each one’s progress without a call per project. A project with a service, or changed in the last day, is counted once a minute; an upload completed, a file deleted or retried, or a files listing through this API counts again at once, so a file copied in with the AWS CLI shows at the next minute. null until the first count. The project is finished when pending and processing are both 0.
boolean
Whether a new file in the input folder starts the project when it is stopped. true unless you turn it off. See Starting again on a new file.
object
The processing instructions, as you sent them, with the engines filled in where you left them out, and sourceMedia written in as {"@type": "S3FolderSource"} if you left it out. Its sourceMedia says where the media comes from: see Inputs. See Configure a project.
object
Where the project’s files are. Upload into inputPath; results appear in outputPath. connection is null for SyncWords’ storage, where path is the project’s folder (the one the upload role reaches), or names the account’s storage connection — your own bucket — whose two folders the project uses.
object
When the project was created and last changed, and who created it (createdBy: the account, and the user, null for an API key). configLocked is true while SyncWords support manages the project’s configuration for you: see Change. messages lists what the config will do that you probably do not mean: see Messages.

Messages

A config can be valid and still waste money. The commonest case: a language is translated, or dubbed, but no output carries it. Every language in translations is produced and billed for every file, whatever the outputs hold, so a Spanish dub that no output has a dub track for costs a dub and delivers nothing. That config is not refused — a project can be set up in steps, and a file can be retried once the output is added, without being billed again. It is reported in meta.messages instead, on the create or change that stored it and on every read after, until the config is fixed:
"info" | "warning" | "error"
How much it matters. warning: it costs money or loses output. More values may be added; treat one you do not know as info.
string
Stable, one per situation: branch on it. The message may be reworded.More codes may be added.
string | null
What it is about: a JSON pointer, the same as the keys of a 422’s errors. Null when it is about the whole project.
string
For people: what is wrong, what it costs, and what to change.
object
The values message names, for a client that words it itself: language, and dubbed on unused_translation.

Create

POST /projects takes name, config, and optionally description, buildVersion, startOnNewFiles, storage and options:
The config is validated in full before anything is stored: against the build’s schema, then against rules the schema cannot express (see Validation). An invalid config answers 422 and nothing is created. The config’s sourceMedia says where the project’s media comes from. Left out, the project reads its input folder ({"@type": "S3FolderSource"}); {"@type": "RssSource", "url": "https://…"} reads an RSS feed instead, {"@type": "MrssSource", …} a Media RSS feed. Choose between the folder and a feed on create: a change between the two is refused with 422 under /config/sourceMedia/@type (a feed’s url and its kind may change). See Inputs. The project-level input field that said this before is gone: sent, it is refused with 422 and The input field is not supported: where the media comes from is config.sourceMedia. under errors.input. startOnNewFiles (default true) is stored with the project: whether a new file in the input folder starts it when it is stopped. See Starting again on a new file. storage puts the project’s input and output folders in your own bucket: {"connectionId": "<a storage connection>", "inputPrefix": "dubbing/in/", "outputPrefix": "dubbing/out/"}, the prefixes optional. Left out, the account’s default connection decides (GET /account/settings); {"connectionId": null} is SyncWords’ storage whatever the default. A project on your bucket reads a folder and writes folders: no feed source, no feed outputs. options are instructions for the create itself and are not stored:
If the config is valid but the service fails to start, the project is still created, in status: "error". The 422 then has code: "service_start_failed" and carries the project’s id; call POST /projects/{id}/start to try again rather than creating another project:

Repeating a create

POST /projects creates a project every time. Send an Idempotency-Key with it, and a repeat of the call with the same key and body answers what the first call did instead of creating a second project; the answer has Idempotency-Replayed: true. Use a new key, such as a UUID, for each project you mean to create. See Repeating a create.

List and find

Projects come newest first. The answer carries links (first, last, prev, next) and meta (current_page, last_page, per_page, total, …). Follow links.next until it is null. Names need not be unique, and POST /projects creates a project every time. So an integration that keeps one project per configuration finds it by name first (an Idempotency-Key protects one create for 24 hours; the name lasts):

Change

PATCH /projects/{id} (or PUT, which behaves the same) takes any of name, description, buildVersion, config and startOnNewFiles. A field you send replaces the stored one, so to change one output you send the whole config with that output changed:
Changing name, description or startOnNewFiles has no effect on processing, and restarts nothing. Changing config or buildVersion of a running project restarts its service with the new instructions:
  • files already done are not reprocessed; retry the ones you want again;
  • a file being processed at that moment is started again under the new config.
If the restarted service does not start, the change is stored anyway: the old service is already gone. The answer is then 422 with code: "service_start_failed" and the project’s id, the project reads error, and POST /projects/{id}/start retries with the new config. A 422 with validation_failed is the other kind: the config was refused, and nothing was stored. While meta.configLocked is true, SyncWords support manages the project’s configuration for you, and a call that would change config or buildVersion answers 409 with code: "project_config_locked"; nothing is stored. name and description can still be changed, and a config equal to the stored one (as GET /projects/{id} shows it, or as you first sent it) is accepted, so a client that always sends its whole project keeps working. Contact support to change the configuration.

The processing service

A project runs one processing service while its status is running. That is the project’s status, from GET /projects/{id}: running, stopped or error. GET /projects/{id}/status reports the service instead, and names its own status field for it: ACTIVE, NOT_RUNNING or ERROR, with the project’s status beside it as projectStatus.
GET /projects/{id}/status
status is ACTIVE (up), NOT_RUNNING (stopped) or ERROR (failed to launch, or launched and then stopped working). On ERROR, POST …/start replaces the service.

Auto-stop

A running service holds compute even while it waits, so a project stops itself in two cases: It never stops itself:
  • with an empty input folder: stopping that one is your call;
  • for being idle when it reads a feed: with nothing left to process it is waiting for the feed’s next item, which only a running service fetches. Stop it with POST /projects/{id}/stop when you no longer want the feed read.
Stopping touches nothing in the folders, and a stopped project costs nothing.

Starting again on a new file

startOnNewFiles (default true) decides whether a new file in the input folder starts a stopped project. Set it on create, change it with PATCH at any time (it takes effect at once and restarts nothing), and read it on the project.
  • “A new file” means one not processed yet. A file copied over a finished one of the same name does not count (see Replace).
  • Retrying a file starts a stopped project that ran before, whatever the setting: a retry is you asking for that file.
  • A file that waits stays pending until POST /projects/{id}/start. The call is harmless on a running project, so an upload routine can always end with it.
  • Completing an API upload answers the project’s state afterwards in projectStatus.

Delete

DELETE /projects/{id} stops the service and deletes the project. The files in its folders are kept, so download what you need first. It answers 204.

Lifecycle errors

Starting, stopping, changing and deleting a running project talk to the processing platform. If it does not answer, the call fails without changing anything: