guides

Projects from files (CI API)

Send files from a repository or a build pipeline in one call, and let wxrks find or create the project and its work units.

A continuous project is identified by its org unit and a CI tag you choose, for example my-app-strings. Every call with the same org unit and tag reaches the same project, so a pipeline can push files on every release without keeping project ids.

Upload a file

Call Upload Continuous Project File with the org unit UUID and the CI tag in the path, and the file as multipart/form-data:

curl -X POST 'https://app.wxrks.com/api/v3/project/ci/<org unit uuid>/my-app-strings' \
  -H "X-AUTH-TOKEN: $WXRKS_TOKEN" \
  -F 'file=@./locales/en.json' \
  -F 'path=locales' \
  -F 'locales=de-DE' \
  -F 'locales=fr-FR'
FieldWhat it does
fileThe file, required. A ZIP adds every file inside it.
localesTarget languages. By default, the org unit's target languages.
sourceSource language. By default, the org unit's default source language. It must match the project's source language.
pathFolder of the file. A file is identified by its name and path, so two files with the same name in different folders stay apart.
workflowsWorkflows for the new work units. By default, the workflows the org unit recommends for the file.
reference, tagsThe project reference when the project is created; tags are added to the project.

What happens:

The answer is the project, with its files.

Create or find the project

You can also create the project before the first upload, to set its details:

Get the translations