Get-ITGlueLog
SYNOPSIS
Get the activity logs for most recent 30 days
SYNTAX
__AllParameterSets
Get-ITGlueLog [[-FilterCreatedAt] <string>] [[-PageNumber] <long>] [[-PageSize] <long>]
[[-Sort] <string>] [-AllResults] [-Raw]
ALIASES
This cmdlet has the following aliases,
- None
DESCRIPTION
The Get-ITGlueLog cmdlet invokes the GET method of the /logs endpoint (Get the activity logs for most recent 30 days)
Get all activity logs of the account for most recent 30 days.
IMPORTANT NOTE: This endpoint is limited to 5 pages of results. If more results are desired, setting a larger page [size] will increase the number of results per page. To iterate over even more results, use filter [created_at] (with created_at sort) to fetch a subset of results based on timestamp, then use the last timestamp in the last page the start date in the filter for the next request.
Example return value:
{ “data”:[ { “id”: “574989297464115201”, “type”: “logs”, “attributes”:{ “created-at”: “2021-07-24T00:55:31.000Z”, “level”: 2, “account-id”: 1, “user-id”: 1, “organization-id”: 1, “action”: “create”, “resource-type”: “User”, “resource-name”: “Super Admin”, “ip-address”: “10.21.0.10”, “ip-city”: “San Diego”, “ip-region”: “CA”, “ip-country”: “United States”, “user-agent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36” } } ] }
EXAMPLES
EXAMPLE 1
Get-ITGlueLog
Returns the result of the /logs endpoint
EXAMPLE 2
Get-ITGlueLog -PageNumber 2 -PageSize 10
Returns the second page of 10 items from the /logs endpoint
EXAMPLE 3
Get-ITGlueLog -AllResults
Returns every item from the /logs endpoint by requesting every page of the results
PARAMETERS
-AllResults
Returns all items from the endpoint by requesting every page of the results
When PageSize is not defined 1000 items are requested with each page
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-FilterCreatedAt
The specified string must be a date range and comma-separated as ‘start_date, end_date’. The dates are UTC. Use ‘*’ for unspecified ‘start_date’ or ‘end_date’. Date ranges longer than a week may be disallowed for performance reasons.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-PageNumber
Notes: Must be a value between 1 and 5 (inclusive).
Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-PageSize
Defines the number of items to return with each page
The maximum page size is 1000
Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 2
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Raw
Returns the full API response (data, meta, links, & included) instead of only the data
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Sort
Notes: To Invert order use -, eg: -name Comma separated values
Allowed values: ‘created_at’
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 3
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
NOTES
Endpoint : GET /logs