Source Files
Update or Restore File
Required scopes: project.source.file (Read and Write).
Update your current file with a new one or restore it to one of the previous revisions
put/projects/{projectId}/files/{fileId}
Request
- Base URLhttps://api.crowdin.com/api/v2
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
projectIdinteger required
Project Identifier. Get via List Projects
fileIdinteger required
File Identifier. Get via List Files
Request body
Example request
{
"storageId": 61,
"name": "umbrella_app.xliff",
"importOptions": {
"importEqSuggestions": true,
"autoApproveImported": true,
"addToTm": true,
"srxStorageId": 61,
"importTranslations": true,
"scheme": {
"identifier": 0,
"sourcePhrase": 1,
"en": 2,
"de": 3
}
},
"attachLabelIds": [
1
],
"detachLabelIds": [
1
]
}Response
File was successfully restored to defined revision
Example response
{
"data": {
"id": 44,
"projectId": 2,
"branchId": 34,
"directoryId": 4,
"name": "umbrella_app.xliff",
"title": "source_app_info",
"context": "Context for translators",
"type": "xliff",
"path": "/directory1/directory2/filename.extension",
"status": "active",
"revisionId": 1,
"priority": "normal",
"importOptions": {
"scheme": {
"identifier": 0,
"sourcePhrase": 1,
"en": 2,
"de": 3
}
},
"exportOptions": {
"exportPattern": "/localization/%locale%/%file_name%.%file_extension%"
},
"excludedTargetLanguages": [
"en",
"es",
"pl"
],
"parserVersion": 12,
"createdAt": "2019-09-19T15:10:43+00:00",
"updatedAt": "2019-09-19T15:10:46+00:00",
"fields": {
"some-field-1": "some value 1",
"some-field-2": 12,
"some-field-3": true,
"some-field-4": [
"en",
"ja"
]
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.