project
The project command is used to access, manipulate, and create projects. The scope of access assigned to your machine account will determine what actions can be completed with the project command.
Subcommands
- create: create a new project
- delete: delete one or more projects
- edit: change the name of a project
- get: retrieves a specific project
- list: list the projects a machine account has access to
For additional details regarding the commands available for project, use:
bws project --help
project create
Use bws project create to create a new project. This command requires a NAME.
bws project create <NAME>In this example, a project will be created with the name My project.
bws project create "My project"By default, bws project create will return objects as a JSON array, as in the following example. You can alter the output format using the --output flag (learn more).
{ "object": "project", "id": "1c80965c-acb3-486e-ac24-b03000dc7318", "organizationId": "10e8cbfa-7bd2-4361-bd6f-b02e013f9c41", "name": "My project", "creationDate": "2023-06-29T13:22:37.942559Z", "revisionDate": "2023-06-29T13:22:37.942559Z"}project delete
Use bws project delete to delete one or more projects designated by the PROJECT_IDS.
bws project delete <PROJECT_IDS>For a single project where f1fe5978-0aa1-4bb0-949b-b03000e0402a represents the PROJECT_ID:
bws project delete f1fe5978-0aa1-4bb0-949b-b03000e0402aFor multiple projects where 1c80965c-acb3-486e-ac24-b03000dc7318 and f277fd80-1bd2-4532-94b2-b03000e00c6c represent the PROJECT_IDS:
bws project delete 1c80965c-acb3-486e-ac24-b03000dc7318 f277fd80-1bd2-4532-94b2-b03000e00c6cOutput:
1 project deleted successfully.project edit
Using the edit command you can change the name of a project with the following input:
bws project edit <PROJECT_ID> --name <NEW_NAME>For example, this command will change the project name to My project 2.
bws project edit 1c80965c-acb3-486e-ac24-b03000dc7318 --name "My project 2"By default, bws project edit will return objects as a JSON array, as in the following example. You can alter the output format using the --output flag (learn more).
{ "object": "project", "id": "1c80965c-acb3-486e-ac24-b03000dc7318", "organizationId": "10e8cbfa-7bd2-4361-bd6f-b02e013f9c41", "name": "My project 2", "creationDate": "2023-06-29T13:22:37.942559Z", "revisionDate": "2023-06-29T13:31:07.927829Z"}project get
The get command retrieves a specific project which the logged-in machine account can access from your vault. Objects in your vault that the machine account does not have access to cannot be retrieved.
bws project get <PROJECT_ID>To get a specific project, use the following command where e325ea69-a3ab-4dff-836f-b02e013fe530 represents a PROJECT_ID:
bws project get e325ea69-a3ab-4dff-836f-b02e013fe530By default, get will return objects as a JSON array, as in the following example. You can alter the output format using the --output flag (learn more).
{ "object": "project", "id": "e325ea69-a3ab-4dff-836f-b02e013fe530", "organizationId": "10e8cbfa-7bd2-4361-bd6f-b02e013f9c41", "name": "App 1", "creationDate": "2023-06-27T19:24:42.181607Z", "revisionDate": "2023-06-27T19:24:42.181607Z"}project list
To list the projects this machine account has access to, use the following command:
bws project listBy default, list will return objects as a JSON array, as in the following example. You can alter the output format using the --output flag (learn more).
[ { "object": "project", "id": "e325ea69-a3ab-4dff-836f-b02e013fe530", "organizationId": "10e8cbfa-7bd2-4361-bd6f-b02e013f9c41", "name": "App 1", "creationDate": "2023-06-27T19:24:42.181607Z", "revisionDate": "2023-06-27T19:24:42.181607Z" }. ...]