Skip to content

Commit

Permalink
Merge pull request #448 from TheJumpCloud/SA-3025_restoreIdField
Browse files Browse the repository at this point in the history
restore ids
  • Loading branch information
jworkmanjc authored Jan 6, 2023
2 parents 5b39c5d + 01d3e8a commit a50dd3d
Show file tree
Hide file tree
Showing 13 changed files with 126 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ parameters:
PublishToPSGallery:
description: "When `true` and when run against Master branch, this workflow will publish the latest code to PSGallery"
type: boolean
default: false
default: true
ManualModuleVersion:
description: "When `true` the pipeline will use the Module Version specified in JumpCloud Module JumpCloud.psd1 file"
type: boolean
Expand Down
19 changes: 17 additions & 2 deletions PowerShell/JumpCloud Module/Docs/Get-JCEvent.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Query the API for Directory Insights events
### GetExpanded (Default)
```
Get-JCEvent -Service <String[]> -StartTime <DateTime> [-EndTime <DateTime>] [-Fields <String[]>]
[-SearchAfter <String[]>] [-SearchTermAnd <Hashtable>] [-SearchTermOr <Hashtable>] [-Sort <String>] [-WhatIf]
[-Confirm] [<CommonParameters>]
[-SearchAfter <String[]>] [-SearchTermAnd <Hashtable>] [-SearchTermNot <Hashtable>]
[-SearchTermOr <Hashtable>] [-Sort <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### Get
Expand Down Expand Up @@ -163,6 +163,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -SearchTermNot
TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the objectfor future-proof-nessand a list of sub-values
```yaml
Type: System.Collections.Hashtable
Parameter Sets: GetExpanded
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -SearchTermOr
TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values
Expand Down
19 changes: 17 additions & 2 deletions PowerShell/JumpCloud Module/Docs/Get-JCEventCount.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Query the API for a count of matching events
### GetExpanded (Default)
```
Get-JCEventCount -Service <String[]> -StartTime <DateTime> [-EndTime <DateTime>] [-Fields <String[]>]
[-SearchAfter <String[]>] [-SearchTermAnd <Hashtable>] [-SearchTermOr <Hashtable>] [-Sort <String>] [-WhatIf]
[-Confirm] [<CommonParameters>]
[-SearchAfter <String[]>] [-SearchTermAnd <Hashtable>] [-SearchTermNot <Hashtable>]
[-SearchTermOr <Hashtable>] [-Sort <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### Get
Expand Down Expand Up @@ -135,6 +135,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -SearchTermNot
TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the objectfor future-proof-nessand a list of sub-values
```yaml
Type: System.Collections.Hashtable
Parameter Sets: GetExpanded
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -SearchTermOr
TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values
Expand Down
2 changes: 1 addition & 1 deletion PowerShell/JumpCloud Module/Docs/JumpCloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Module Name: JumpCloud
Module Guid: 31c023d1-a901-48c4-90a3-082f91b31646
Download Help Link: https://github.com/TheJumpCloud/support/wiki
Help Version: 2.1.2
Help Version: 2.1.3
Locale: en-US
---

Expand Down
2 changes: 1 addition & 1 deletion PowerShell/JumpCloud Module/Docs/Set-JCSettingsFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Updates the JumpCloud Module Settings File
## SYNTAX

```
Set-JCSettingsFile [-parallelOverride <PSObject>] [-moduleBannerMessageCount <PSObject>] [<CommonParameters>]
Set-JCSettingsFile [-moduleBannerMessageCount <PSObject>] [-parallelOverride <PSObject>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down
2 changes: 1 addition & 1 deletion PowerShell/JumpCloud Module/JumpCloud.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>JumpCloud</id>
<version>2.1.2</version>
<version>2.1.3.7258-202301031629</version>
<description>PowerShell functions to manage a JumpCloud Directory-as-a-Service</description>
<authors>JumpCloud Solutions Architect Team</authors>
<owners>JumpCloud</owners>
Expand Down
4 changes: 2 additions & 2 deletions PowerShell/JumpCloud Module/JumpCloud.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: JumpCloud Solutions Architect Team
#
# Generated on: 11/30/2022
# Generated on: 1/6/2023
#

@{
Expand All @@ -12,7 +12,7 @@
RootModule = 'JumpCloud.psm1'

# Version number of this module.
ModuleVersion = '2.1.2'
ModuleVersion = '2.1.3'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
Query the API for Directory Insights events
#### Sample Request
```
curl -X POST 'https://api.jumpcloud.com/insights/directory/v1/events' -H 'Content-Type: application/json' -H 'x-api-key: {API_KEY}' --data '{\"service\": [\"all\"], \"start_time\": \"2021-07-14T23:00:00Z\", \"end_time\": \"2021-07-28T14:00:00Z\", \"sort\": \"DESC\", \"fields\": [\"timestamp\", \"event_type\", \"initiated_by\", \"success\", \"client_ip\", \"provider\", \"organization\"]}'
curl -X POST 'https://api.jumpcloud.com/insights/directory/v1/events' -H 'Content-Type: application/json' -H 'x-api-key: REPLACE_KEY_VALUE' --data '{\"service\": [\"all\"], \"start_time\": \"2021-07-14T23:00:00Z\", \"end_time\": \"2021-07-28T14:00:00Z\", \"sort\": \"DESC\", \"fields\": [\"timestamp\", \"event_type\", \"initiated_by\", \"success\", \"client_ip\", \"provider\", \"organization\"]}'
```
.Description
Query the API for Directory Insights events
#### Sample Request
```
curl -X POST 'https://api.jumpcloud.com/insights/directory/v1/events' -H 'Content-Type: application/json' -H 'x-api-key: {API_KEY}' --data '{\"service\": [\"all\"], \"start_time\": \"2021-07-14T23:00:00Z\", \"end_time\": \"2021-07-28T14:00:00Z\", \"sort\": \"DESC\", \"fields\": [\"timestamp\", \"event_type\", \"initiated_by\", \"success\", \"client_ip\", \"provider\", \"organization\"]}'
curl -X POST 'https://api.jumpcloud.com/insights/directory/v1/events' -H 'Content-Type: application/json' -H 'x-api-key: REPLACE_KEY_VALUE' --data '{\"service\": [\"all\"], \"start_time\": \"2021-07-14T23:00:00Z\", \"end_time\": \"2021-07-28T14:00:00Z\", \"sort\": \"DESC\", \"fields\": [\"timestamp\", \"event_type\", \"initiated_by\", \"success\", \"client_ip\", \"provider\", \"organization\"]}'
```
.Example
PS C:\> Get-JCEvent -Service:('all') -StartTime:((Get-date).AddDays(-30))
Expand Down Expand Up @@ -62,6 +62,7 @@ BODY <IEventQuery>: EventQuery is the users' command to search our auth logs
[SearchAfter <String[]>]: Specific query to search after, see x-* response headers for next values
[SearchTermAnd <ITermConjunction>]: TermConjunction represents a conjunction (and/or) NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values
[(Any) <Object>]: This indicates any property can be added to this object.
[SearchTermNot <ITermConjunction>]: TermConjunction represents a conjunction (and/or) NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values
[SearchTermOr <ITermConjunction>]: TermConjunction represents a conjunction (and/or) NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values
[Sort <String>]: ASC or DESC order for timestamp
.Link
Expand Down Expand Up @@ -112,6 +113,13 @@ Function Get-JCEvent
# TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the objectfor future-proof-nessand a list of sub-values
${SearchTermAnd},

[Parameter(ParameterSetName='GetExpanded')]
[JumpCloud.SDK.DirectoryInsights.Category('Body')]
[JumpCloud.SDK.DirectoryInsights.Runtime.Info(PossibleTypes=([JumpCloud.SDK.DirectoryInsights.Models.ITermConjunction]))]
[System.Collections.Hashtable]
# TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the objectfor future-proof-nessand a list of sub-values
${SearchTermNot},

[Parameter(ParameterSetName='GetExpanded')]
[JumpCloud.SDK.DirectoryInsights.Category('Body')]
[JumpCloud.SDK.DirectoryInsights.Runtime.Info(PossibleTypes=([JumpCloud.SDK.DirectoryInsights.Models.ITermConjunction]))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
Query the API for a count of matching events
#### Sample Request
```
curl -X POST 'https://api.jumpcloud.com/insights/directory/v1/events/count' -H 'Content-Type: application/json' -H 'x-api-key: {API_KEY}' --data '{\"service\": [\"all\"], \"start_time\": \"2021-07-14T23:00:00Z\", \"end_time\": \"2021-07-28T14:00:00Z\", \"sort\": \"DESC\", \"fields\": [\"timestamp\", \"event_type\", \"initiated_by\", \"success\", \"client_ip\", \"provider\", \"organization\"]}'
curl -X POST 'https://api.jumpcloud.com/insights/directory/v1/events/count' -H 'Content-Type: application/json' -H 'x-api-key: REPLACE_KEY_VALUE' --data '{\"service\": [\"all\"], \"start_time\": \"2021-07-14T23:00:00Z\", \"end_time\": \"2021-07-28T14:00:00Z\", \"sort\": \"DESC\", \"fields\": [\"timestamp\", \"event_type\", \"initiated_by\", \"success\", \"client_ip\", \"provider\", \"organization\"]}'
```
.Description
Query the API for a count of matching events
#### Sample Request
```
curl -X POST 'https://api.jumpcloud.com/insights/directory/v1/events/count' -H 'Content-Type: application/json' -H 'x-api-key: {API_KEY}' --data '{\"service\": [\"all\"], \"start_time\": \"2021-07-14T23:00:00Z\", \"end_time\": \"2021-07-28T14:00:00Z\", \"sort\": \"DESC\", \"fields\": [\"timestamp\", \"event_type\", \"initiated_by\", \"success\", \"client_ip\", \"provider\", \"organization\"]}'
curl -X POST 'https://api.jumpcloud.com/insights/directory/v1/events/count' -H 'Content-Type: application/json' -H 'x-api-key: REPLACE_KEY_VALUE' --data '{\"service\": [\"all\"], \"start_time\": \"2021-07-14T23:00:00Z\", \"end_time\": \"2021-07-28T14:00:00Z\", \"sort\": \"DESC\", \"fields\": [\"timestamp\", \"event_type\", \"initiated_by\", \"success\", \"client_ip\", \"provider\", \"organization\"]}'
```
.Example
PS C:\> Get-JCEventCount -Service:('all') -StartTime:((Get-date).AddDays(-30))
Expand Down Expand Up @@ -46,6 +46,7 @@ BODY <IEventQuery>: EventQuery is the users' command to search our auth logs
[SearchAfter <String[]>]: Specific query to search after, see x-* response headers for next values
[SearchTermAnd <ITermConjunction>]: TermConjunction represents a conjunction (and/or) NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values
[(Any) <Object>]: This indicates any property can be added to this object.
[SearchTermNot <ITermConjunction>]: TermConjunction represents a conjunction (and/or) NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values
[SearchTermOr <ITermConjunction>]: TermConjunction represents a conjunction (and/or) NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values
[Sort <String>]: ASC or DESC order for timestamp
.Link
Expand Down Expand Up @@ -96,6 +97,13 @@ Function Get-JCEventCount
# TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the objectfor future-proof-nessand a list of sub-values
${SearchTermAnd},

[Parameter(ParameterSetName='GetExpanded')]
[JumpCloud.SDK.DirectoryInsights.Category('Body')]
[JumpCloud.SDK.DirectoryInsights.Runtime.Info(PossibleTypes=([JumpCloud.SDK.DirectoryInsights.Models.ITermConjunction]))]
[System.Collections.Hashtable]
# TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the objectfor future-proof-nessand a list of sub-values
${SearchTermNot},

[Parameter(ParameterSetName='GetExpanded')]
[JumpCloud.SDK.DirectoryInsights.Category('Body')]
[JumpCloud.SDK.DirectoryInsights.Runtime.Info(PossibleTypes=([JumpCloud.SDK.DirectoryInsights.Models.ITermConjunction]))]
Expand Down
4 changes: 2 additions & 2 deletions PowerShell/JumpCloud Module/Public/Systems/Get-JCSystem.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ Function Get-JCSystem () {
}

# Gather list of devices that match the date filter
$dateFilterList = $dateFilterList | Select-Object -ExcludeProperty associatedTagCount, id, sshRootEnabled
$dateFilterList = $dateFilterList | Select-Object -ExcludeProperty associatedTagCount, sshRootEnabled

# Find and remove the date parameters from bound parameters
$dateParameters = @("filterDateProperty", "dateFilter", "date")
Expand Down Expand Up @@ -461,7 +461,7 @@ Function Get-JCSystem () {

switch ($PSCmdlet.ParameterSetName) {
SearchFilter {
return $resultsArrayList | Select-Object -ExcludeProperty associatedTagCount, id, sshRootEnabled
return $resultsArrayList | Select-Object -ExcludeProperty associatedTagCount, sshRootEnabled
}
ByID {
return $resultsArrayList | Select-Object -ExcludeProperty associatedTagCount
Expand Down
2 changes: 1 addition & 1 deletion PowerShell/JumpCloud Module/Public/Users/Get-JCUser.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ Function Get-JCUser () {

switch ($PSCmdlet.ParameterSetName) {
SearchFilter {
return $resultsArrayList | Select-Object -ExcludeProperty associatedTagCount, id, sshRootEnabled
return $resultsArrayList | Select-Object -ExcludeProperty associatedTagCount, sshRootEnabled
}
ByID {
return $resultsArrayList | Select-Object -ExcludeProperty associatedTagCount
Expand Down
48 changes: 48 additions & 0 deletions PowerShell/JumpCloud Module/en-Us/JumpCloud-help.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4246,6 +4246,18 @@ PS C:\&gt; $BackupJcOrganizationResults.User</dev:code>
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>SearchTermNot</maml:name>
<maml:description>
<maml:para>TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the objectfor future-proof-nessand a list of sub-values</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">System.Collections.Hashtable</command:parameterValue>
<dev:type>
<maml:name>System.Collections.Hashtable</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>SearchTermOr</maml:name>
<maml:description>
Expand Down Expand Up @@ -4379,6 +4391,18 @@ PS C:\&gt; $BackupJcOrganizationResults.User</dev:code>
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>SearchTermNot</maml:name>
<maml:description>
<maml:para>TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the objectfor future-proof-nessand a list of sub-values</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">System.Collections.Hashtable</command:parameterValue>
<dev:type>
<maml:name>System.Collections.Hashtable</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>SearchTermOr</maml:name>
<maml:description>
Expand Down Expand Up @@ -4643,6 +4667,18 @@ PS C:\&gt; $BackupJcOrganizationResults.User</dev:code>
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>SearchTermNot</maml:name>
<maml:description>
<maml:para>TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the objectfor future-proof-nessand a list of sub-values</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">System.Collections.Hashtable</command:parameterValue>
<dev:type>
<maml:name>System.Collections.Hashtable</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>SearchTermOr</maml:name>
<maml:description>
Expand Down Expand Up @@ -4776,6 +4812,18 @@ PS C:\&gt; $BackupJcOrganizationResults.User</dev:code>
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>SearchTermNot</maml:name>
<maml:description>
<maml:para>TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the objectfor future-proof-nessand a list of sub-values</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">System.Collections.Hashtable</command:parameterValue>
<dev:type>
<maml:name>System.Collections.Hashtable</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
<maml:name>SearchTermOr</maml:name>
<maml:description>
Expand Down
16 changes: 15 additions & 1 deletion PowerShell/ModuleChangelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
## 2.1.3

Release Date: January 5, 2023

#### RELEASE NOTES

```
- Restored a missing id field for users and systems
```

#### BUG FIXES:

- Get-JCSystem/ User functions were missing the .id data field on PowerShell versions 7+. This release restores this field. The .\_id filed is unaffected but you can choose to reference either $system.id or $system.\_id.

## 2.1.2

Release Date: November 22, 2022
Release Date: November 30, 2022

#### RELEASE NOTES

Expand Down

0 comments on commit a50dd3d

Please sign in to comment.