Skip to content

Commit 201afa0

Browse files
J-C-Bafiunelacework-aaronscheiber
authored
docs(cli): remove API v1 refs and add examples (#1278)
Co-authored-by: Salim Afiune <[email protected]> Co-authored-by: lacework-aaronscheiber <[email protected]>
1 parent 6740c1b commit 201afa0

File tree

2 files changed

+16
-20
lines changed
  • cli/cmd
  • integration/test_resources/help

2 files changed

+16
-20
lines changed

cli/cmd/api.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,21 @@ var (
3939
apiCmd = &cobra.Command{
4040
Use: "api <method> <path>",
4141
Short: "Helper to call Lacework's API",
42-
Long: `Use this command as a helper to call any available Lacework API v1 & v2 endpoint.
42+
Long: `Use this command as a helper to call any available Lacework API v2 endpoint.
4343
44-
### For APIv1
44+
### API v2
4545
46-
To list all integrations configured in your account:
46+
To list all available Lacework schema types:
4747
48-
lacework api get /v1/external/integrations
48+
lacework api get /v2/schemas
4949
50-
For a complete list of available API v1 endpoints visit:
50+
To receive a json response of all machines within the given time window:
5151
52-
https://<ACCOUNT>.lacework.net/api/v1/external/docs
52+
lacework api post /api/v2/Entities/Machines/search -d "{}"
5353
54-
### For APIv2
54+
To receive a json response of all agents within the given time window:
5555
56-
To list all available Lacework schema types:
57-
58-
lacework api get /v2/schemas
56+
lacework api post /api/v2/AgentInfo/search -d "{}"
5957
6058
For a complete list of available API v2 endpoints visit:
6159

integration/test_resources/help/api

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1-
Use this command as a helper to call any available Lacework API v1 & v2 endpoint.
1+
Use this command as a helper to call any available Lacework API v2 endpoint.
22

3-
### For APIv1
3+
### API v2
44

5-
To list all integrations configured in your account:
5+
To list all available Lacework schema types:
66

7-
lacework api get /v1/external/integrations
7+
lacework api get /v2/schemas
88

9-
For a complete list of available API v1 endpoints visit:
9+
To receive a json response of all machines within the given time window:
1010

11-
https://<ACCOUNT>.lacework.net/api/v1/external/docs
11+
lacework api post /api/v2/Entities/Machines/search -d "{}"
1212

13-
### For APIv2
13+
To receive a json response of all agents within the given time window:
1414

15-
To list all available Lacework schema types:
16-
17-
lacework api get /v2/schemas
15+
lacework api post /api/v2/AgentInfo/search -d "{}"
1816

1917
For a complete list of available API v2 endpoints visit:
2018

0 commit comments

Comments
 (0)