This command is used with Reunite products only. It provides details about files, deployments, and API scorecards, using a <pushId> that is returned by an earlier push command.
The push-status command can be used whenever the application or process executing a push command (without --wait-for-deployment option) returns the pushId. This identifier can be used by subsequent systems to perform custom logic when the deployment is completed.
Have the following before you use the push-status command:
- A user account in a Reunite project.
- An active organization API key.
- Redocly CLI v1.10.x or later.
Use the REDOCLY_AUTHORIZATION environment variable to set the API key. See the Manage API keys page in the documentation for details on how to get your API key in Reunite.
REDOCLY_AUTHORIZATION=<api-key> redocly push-status <pushId> --organization <organizationId> --project <projectId> [--wait] [--continue-on-deploy-failures] [--max-execution-time <timeInSeconds>]
| Option | Type | Description |
|---|---|---|
| pushId | string | REQUIRED. Identifier of the push you are tracking. Returned as result of the push command. |
| --organization, -o | string | REQUIRED. Organization ID, for example org_01h1s5z6vf2mm1mz3hevnn9va7. |
| --project, -p | string | REQUIRED. Project ID, for example prj_01hh1t9sa6gwfv5naz04gr7ehm. |
| --domain, -d | string | The domain that the push command pushed to. Default value is https://app.cloud.redocly.com. |
| --wait | boolean | Waits until the build is completed if it is in progress. Default value is false. |
| --max-execution-time | number | Maximum wait time for build completion in seconds (used in conjunction with the --wait option). Default value is 1200. |
| --continue-on-deploy-failures | boolean | Prevents the command from returning a non-zero exit code when the deployment fails. Default value is false. |
How to find the organization and project IDs
- Log in to Reunite.
- Open Organization settings and copy the Organization ID.
- Open the project and copy the Project ID from Project settings.
Organization and project slugs are still accepted and resolved to IDs, but they are deprecated.
When push is performed from the repository's default branch, a preview build is automatically followed by a production build; this command can send only the completed builds or wait for uncompleted builds to complete.
The following example command prints the status of completed preview and production builds as well as scorecards if they exist for the push with the ID push_01hkw0p0wg348n3gtxmv8rt6hy in the redocly organization and awesome-api-docs project:
REDOCLY_AUTHORIZATION='api-key' redocly push-status push_01hkw0p0wg348n3gtxmv8rt6hy -o=org_01h1s5z6vf2mm1mz3hevnn9va7 -p=prj_01hh1t9sa6gwfv5naz04gr7ehm
If there are preview or production builds that haven't completed yet for the push ID, they are not included in the output of this command.
You can configure the push-status command to check the deployment statuses of the preview build (and subsequent production build if applicable), and if the builds are not complete, check every 5 seconds until the builds are complete.
The following example command prints the status for the preview and production builds as well as scorecards if they exist for the push with the ID push_01hkw0p0wg348n3gtxmv8rt6hy in the redocly organization and awesome-api-docs project:
REDOCLY_AUTHORIZATION='api-key' redocly push-status push_01hkw0p0wg348n3gtxmv8rt6hy -o=org_01h1s5z6vf2mm1mz3hevnn9va7 -p=prj_01hh1t9sa6gwfv5naz04gr7ehm --wait