Skip to content

Create a CLI to interact with Gallagher Command Centre #13

Open
@devraj

Description

@devraj

While building the API, I found myself constantly making http requests to test payloads. I have also been moving a lot of my workloads to the command line for services like stripe or github via their CLI.

I also have a set of httpie based payloads that I use to support some of our clients e.g:

echo -n '
{
  "accessGroups": {
    "add": [{
      "accessGroup": {
	    "href": "https://commandcentre-api-au.security.gallagher.cloud/api/access_groups/1052"
      },
      "from": "2023-04-11T10:30:00Z",
      "until": "2023-05-11T10:30:00Z"
    }]
  }
}' | http patch https://commandcentre-api-au.security.gallagher.cloud/api/cardholders/4149 "Authorization: GGL-API-KEY $GH_API_KEY"

the above adds an access group to a cardholder

The proposal is to build upon the REST API client and provide a cli to interact with the command centre to perform various operations.

A sample of what the user would be able to do would look like:

gl cardholder search devraj

or

gl cardholder get 3222

Metadata

Metadata

Assignees

Labels

cliCommand line interfacedocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions