Continuous Projects
Import a file
POST
https://localize.cirro.io/api/v2/continuous_projects/:uid/imports
Parameters
Parameter | Type | Note | |
---|---|---|---|
uid | required | string | the Project UID from Setup tab in the web interface |
import[file] | required | file | the file in binary format |
import[source_language_code] | required | string | iso code of the source language |
import[conflict_mode] | optional | string | the strategy used for merging: replace or additive_only ; if not sent by default is replace |
Result
Returns the imported object
{
"import": {
"id": 123,
"conflict_mode": "replace",
"target_file": {
"key": "-your-file-name-.yml",
"target_language": "en"
}
}
}
Example
1curl https://localize.cirro.io/api/v2/continuous_projects/UID/imports \
2 -H "Authorization: jwt <JWT_ACCESS_TOKEN>" \
3 -H 'Content-Type: application/json'
4 --form 'import[file]=@local_path_to_your_file' \
5 --form 'import[source_language_code]="en"'