Skip to content

Commit a0a0e2f

Browse files
committed
updated documentation for list teams & create teams
1 parent c528bb3 commit a0a0e2f

1 file changed

Lines changed: 77 additions & 1 deletion

File tree

README.md

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,89 @@ attack_guid = attacks.create_attack(body=body, teamId=config.team_guid)
8686
from gremlinapi.config import GremlinAPIConfig as config
8787
from gremlinapi.orgs import GremlinAPIOrgs as orgs
8888
config.bearer_token = 'Bearer MU3...ZiTk...Lo...4zO..c='
89-
orgs.list_orgs()
89+
all_orgs = orgs.list_orgs()
90+
```
91+
92+
```python
93+
import pprint
94+
pprint.pprint(all_orgs)
95+
```
96+
97+
```python
98+
[{'active': True,
99+
'auto_add_users': False,
100+
'certificate_expiration_imminent': False,
101+
'certificate_expires_on': '2021-02-02T18:38:54.000Z',
102+
'certificate_set_at': '2020-02-03T18:38:54.654Z',
103+
'certificate_set_by': 'john+demo@gremlin.com',
104+
'company_id': '9676868b-60d2-5ebe-aa66-c1de8162ff9d',
105+
'created_at': '2020-02-03T18:38:54.654Z',
106+
'identifier': 'cb7ca0d3-4bac-542c-9059-3ee48df857fa',
107+
'idle': False,
108+
'name': 'testteam1',
109+
'secret_set_at': '2020-02-03T18:38:54.654Z',
110+
'secret_set_by': 'john+demo@gremlin.com',
111+
'updated_at': '2020-02-03T18:38:54.654Z'},
112+
{'active': True,
113+
'auto_add_users': False,
114+
'certificate_expiration_imminent': False,
115+
'certificate_expires_on': '2021-02-02T18:40:33.000Z',
116+
'certificate_set_at': '2020-02-03T18:40:33.967Z',
117+
'certificate_set_by': 'john+demo@gremlin.com',
118+
'company_id': '9676868b-60d2-5ebe-aa66-c1de8162ff9d',
119+
'created_at': '2020-02-03T18:40:33.967Z',
120+
'identifier': 'c049bf49-f236-5df7-9e2e-5c3858e32426',
121+
'idle': False,
122+
'name': 'testteam2',
123+
'secret_set_at': '2020-02-03T18:40:33.967Z',
124+
'secret_set_by': 'john+demo@gremlin.com',
125+
'updated_at': '2020-02-03T18:40:33.967Z'},
126+
{'active': True,
127+
'auto_add_users': False,
128+
'certificate_expiration_imminent': False,
129+
'certificate_expires_on': '2021-03-19T18:03:54.000Z',
130+
'certificate_set_at': '2020-03-19T18:03:54.355Z',
131+
'certificate_set_by': 'kyle+demo@gremlin.com',
132+
'company_id': '9676868b-60d2-5ebe-aa66-c1de8162ff9d',
133+
'created_at': '2020-03-19T18:03:54.355Z',
134+
'identifier': 'df51deb3-3fa6-5e9e-947f-9d5ef62418f1',
135+
'idle': False,
136+
'name': 'My New Awesome Team Name',
137+
'updated_at': '2020-03-19T18:03:54.355Z'}]
90138
```
91139

92140
#### Create a team
93141
```python
94142
from gremlinapi.config import GremlinAPIConfig as config
95143
from gremlinapi.orgs import GremlinAPIOrgs as orgs
96144
config.bearer_token = 'Bearer MU3...ZiTk...Lo...4zO..c='
145+
new_team_details = orgs.create_org(name='My New Awesome Team Name')
146+
```
147+
148+
```python
149+
import pprint
150+
pprint.pprint(new_team_details)
151+
```
152+
153+
```python
154+
{'has_secret': True,
155+
'org_id': 'df51deb3-3fa6-5e9e-947f-9d5ef62418f1',
156+
'pem_encoded_certificate': '-----BEGIN CERTIFICATE-----\n'
157+
'MIIBvDCCAWKgAwIBAgIBATAKBggqhkjOPQQDAjBYMSMwIQYDVQQDDBpHcmVtbGlu\n'
158+
'IENsaWVudCBDZXJ0aWZpY2F0ZTEOMAwGA1UECwwFSG9vbGkxITAfBgNVBAoMGE15\n'
159+
'IE5ldyBBd2Vzb21lIFRlYW0gTmFtZTAeFw0yMDAzMTkxODAzNTRaFw0yMTAzMTkx\n'
160+
'ODAzNTRaMFgxIzAhBgNVBAMMGkdyZW1saW4gQ2xpZW50IENlcnRpZmljYXRlMQ4w\n'
161+
'DAYDVQQLDAVIb29saTEhMB8GA1UECgwYTXkgTmV3IEF3ZXNvbWUgVGVhbSBOYW1l\n'
162+
'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEOEb1Dxa58N95g30S9S05B0v3O9US\n'
163+
'Ug1hAuxKfxjLHeuO/R60yuR5RYZ0y4lz87iUSI4eAaBGhCLkwba4GyvZqKMdMBsw\n'
164+
'CQYDVR0TBAIwADAOBgNVHQ8BAf8EBAMCB4AwCgYIKoZIzj0EAwIDSAAwRQIhAJiG\n'
165+
'g6MA9ortNvkWGzhTa02SA15G31hcSKVrQXbCgwrOAiBVgaCFsrZxq5Vg+EUvevwQ\n'
166+
'v8470+Rt7YEGxpn3GDCI6Q==\n'
167+
'-----END CERTIFICATE-----\n',
168+
'pem_encoded_private_key': '-----BEGIN EC PRIVATE KEY-----\n'
169+
'MHcCAQEEILujxbpH0qAtcjZTmutPWvWgbWwa9VseQqFH/aJE1BntoAoGCCqGSM49\n'
170+
'AwEHoUQDQgAEOEb1Dxa58N95g30S9S05B0v3O9USUg1hAuxKfxjLHeuO/R60yuR5\n'
171+
'RYZ0y4lz87iUSI4eAaBGhCLkwba4GyvZqA==\n'
172+
'-----END EC PRIVATE KEY-----\n'}
97173

98174
```

0 commit comments

Comments
 (0)