Skip to content

Expose Cloud API endpoints as commands #639

@cdhunt

Description

@cdhunt

What problem does this feature solve?:

It would be convenient if the CLI expose some more API methods using information like the git repo and known credentials to populate the API parameters.

Provide an example:

Example

Get your pipelines.

$ circleci pipeline list

project_slug                        number state   created_at           updated_at
gh/CircleCI-Public/api-preview-docs 0      created 8/24/2019 2:15:22 PM 8/24/2019 2:15:22 PM

Example

Approve workflow

$ circleci workflow approve --id 497f6eca-6276-4993-bfeb-53cbbbba6f08

Example

Get recent workflow runs

$ circleci runs list

branch duration created_at           stopped_at           credits_used status
main 0          8/24/2019 2:15:22 PM 8/24/2019 2:15:22 PM 0            success

The GitHub CLI does an excellent job of making their API easier to consume for simple automation tasks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions