Command parameters

Some commands accept parameters and JSON payloads. We can view what kind of parameters or JSON payload they can accept, we can use the --help flag:

> motaword projects get-project --help Get single project Usage: motaword projects get-project id [flags] Flags: -h, --help help for get-project --with[] string Include detailed information. Possible values 'client', 'vendor', 'score'

get-project command only accepts and id parameter and with[] flag.

Some commands will accept JSON payloads, these are usually create/update commands (e.g. POST/PUT requests in HTTP).

We can view the shape of the request payload via --help. The request description is an OpenAPI specification. Here is an example (removed descriptions for brevity):

> motaword reports get-projects-report --help ## Request Schema (application/json) properties: budget_code: type: string date_from: format: date-time type: string date_to: format: date-time type: string source_languages: items: type: string type: array target_languages: items: type: string type: array users: items: format: int64 type: integer type: array type: object Usage: motaword reports get-projects-report [flags] Flags: -h, --help help for get-projects-report

According to the request schema in the help output, you can send this payload with this command (which will generate your projects report within these dates):

{ "date_from":"2021-04-21T16:07:12.727Z", "date_to":"2021-05-21T16:07:12.727Z" }