crowdin app api
Descriptionā
Call one of the application's API methods
Synopsisā
crowdin app api <identifier> <path> [OPTIONS]
Argumentsā
<identifier>
Application identifier, as printed by 'crowdin app list'
<path>
API method path, optionally with a query string
Optionsā
-X, --method=ā¦
HTTP method: GET, POST, PUT, PATCH or DELETE
-f, --field=ā¦
Add a string field as key=value. Repeat 'key[]=value' to send an array
-F, --typed-field=ā¦
Add a field as key=value, converting true, false, null and integers, and reading @file
--input=ā¦
Read the JSON request body from a file, or '-' for stdin
--dryrun
Print a command output without execution
-h, --help
Display help message and exit
Config Optionsā
-T, --token=ā¦
Personal access token required for authentication
--base-url=ā¦
Base URL of Crowdin server for API requests execution
--base-path=ā¦
Path to your project directory on a local machine
Global Optionsā
-v, --verbose
Provide more information about the command execution
-c, --config=ā¦
Specify a path to the configuration file
--identity=ā¦
Specify a path to user-specific credentials
--no-colors
Disable colors and styles
--no-progress
Disable progress on executed command
-o, --output=ā¦
Change output format (choices: "json", "toon", "plain")
Examplesā
Read the application settings of a project:
crowdin app api zendesk-guide settings -F projectId=12
Import selected items, sending an array with the key[]=value form:
crowdin app api zendesk-guide crowdin-update -X POST -F projectId=12 -f 'entryIds[]=cam_1' -f 'entryIds[]=cam_2'
Send a request body from a file:
crowdin app api zendesk-guide integration-update --input body.json
Cancel a job:
crowdin app api zendesk-guide jobs -X DELETE -F projectId=12 -F jobId=067dā¦
Print the request without sending it:
crowdin app api zendesk-guide 'job-info?projectId=12&jobId=067dā¦' --dryrun
Notesā
- The method defaults to
GET, orPOSTwhen--inputis given. Fields never change it, so pass-X POSTto write. - With
GETandDELETE, fields are sent as query parameters. WithPOST,PUTandPATCH, they form the JSON body. -fsends the value as a string.-Fconvertstrue,false,nulland integers, and reads@file.- A key ending in
[]collects its values into an array. Giving a plain key twice is an error. - Put
-fand-Fafter<identifier> <path>. A field flag takes every following word up to the next option as a value, so a path written after it would be read as a field. - The result is the application's JSON response. Errors returned by the application are printed with its own message.
- The token needs the
application.proxyscope.