Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,44 @@ func main() {
// Define the payload for creating a new computer prestage
prestage := jamfpro.ResourceComputerPrestage{
DisplayName: "jamfpro-sdk-example-computerPrestageFull-config",
Mandatory: jamfpro.TruePtr(),
MDMRemovable: jamfpro.TruePtr(),
Mandatory: true,
MDMRemovable: true,
SupportPhoneNumber: "111-222-3333",
SupportEmailAddress: "email@company.com",
Department: "department name",
DefaultPrestage: jamfpro.FalsePtr(),
DefaultPrestage: false,
EnrollmentSiteId: "-1",
KeepExistingSiteMembership: jamfpro.FalsePtr(),
KeepExistingLocationInformation: jamfpro.FalsePtr(),
RequireAuthentication: jamfpro.FalsePtr(),
KeepExistingSiteMembership: false,
KeepExistingLocationInformation: false,
RequireAuthentication: false,
AuthenticationPrompt: "hello welcome to your enterprise managed macOS device",
PreventActivationLock: jamfpro.FalsePtr(),
EnableDeviceBasedActivationLock: jamfpro.FalsePtr(),
PreventActivationLock: false,
EnableDeviceBasedActivationLock: false,
DeviceEnrollmentProgramInstanceId: "1",
SkipSetupItems: jamfpro.ComputerPrestageSubsetSkipSetupItems{
// Selected items are not displayed in the Setup Assistant during enrollment
Biometric: jamfpro.TruePtr(),
TermsOfAddress: jamfpro.TruePtr(),
FileVault: jamfpro.TruePtr(),
ICloudDiagnostics: jamfpro.TruePtr(),
Diagnostics: jamfpro.TruePtr(),
Accessibility: jamfpro.TruePtr(),
AppleID: jamfpro.TruePtr(),
ScreenTime: jamfpro.TruePtr(),
Siri: jamfpro.TruePtr(),
DisplayTone: jamfpro.FalsePtr(), // Deprecated
Restore: jamfpro.TruePtr(),
Appearance: jamfpro.TruePtr(),
Privacy: jamfpro.TruePtr(),
Payment: jamfpro.TruePtr(),
Registration: jamfpro.TruePtr(),
TOS: jamfpro.TruePtr(),
ICloudStorage: jamfpro.TruePtr(),
Location: jamfpro.FalsePtr(),
Intelligence: jamfpro.TruePtr(),
EnableLockdownMode: jamfpro.TruePtr(),
Welcome: jamfpro.TruePtr(),
Wallpaper: jamfpro.TruePtr(),
Biometric: true,
TermsOfAddress: true,
FileVault: true,
ICloudDiagnostics: true,
Diagnostics: true,
Accessibility: true,
AppleID: true,
ScreenTime: true,
Siri: true,
DisplayTone: false, // Deprecated
Restore: true,
Appearance: true,
Privacy: true,
Payment: true,
Registration: true,
TOS: true,
ICloudStorage: true,
Location: false,
Intelligence: true,
EnableLockdownMode: true,
Welcome: true,
Wallpaper: true,
},
LocationInformation: jamfpro.ComputerPrestageSubsetLocationInformation{
ID: "-1", // Required
Expand All @@ -74,8 +74,8 @@ func main() {
},
PurchasingInformation: jamfpro.ComputerPrestageSubsetPurchasingInformation{
ID: "-1", // Required
Leased: jamfpro.FalsePtr(),
Purchased: jamfpro.TruePtr(),
Leased: false,
Purchased: true,
AppleCareId: "",
PONumber: "",
Vendor: "",
Expand All @@ -89,33 +89,33 @@ func main() {
VersionLock: 0,
},
EnrollmentCustomizationId: "0",
AutoAdvanceSetup: jamfpro.FalsePtr(),
InstallProfilesDuringSetup: jamfpro.TruePtr(),
AutoAdvanceSetup: false,
InstallProfilesDuringSetup: true,
PrestageInstalledProfileIds: []string{},
CustomPackageIds: []string{"1", "2"},
CustomPackageDistributionPointId: "-1", // -2 for all cloud distribution points , -1 for not used, then id for all distribution points
EnableRecoveryLock: jamfpro.FalsePtr(),
EnableRecoveryLock: false,
RecoveryLockPasswordType: "MANUAL",
RotateRecoveryLockPassword: jamfpro.FalsePtr(),
RotateRecoveryLockPassword: false,
PrestageMinimumOsTargetVersionType: "MINIMUM_OS_SPECIFIC_VERSION", // NO_ENFORCEMENT / MINIMUM_OS_LATEST_VERSION / MINIMUM_OS_LATEST_MAJOR_VERSION / MINIMUM_OS_LATEST_MINOR_VERSION / MINIMUM_OS_SPECIFIC_VERSION
MinimumOsSpecificVersion: "14.6", // Required if PrestageMinimumOsTargetVersionType is MINIMUM_OS_SPECIFIC_VERSION
//ProfileUuid: "0386E7C8D455A040106850A8A2033968", // Automated Device Enrollment instance to associate with the PreStage enrollment. Devices associated with the selected Automated Device Enrollment instance can be assigned the PreStage enrollment
SiteId: "-1",
VersionLock: 0,
AccountSettings: jamfpro.ComputerPrestageSubsetAccountSettings{
PayloadConfigured: jamfpro.TruePtr(),
LocalAdminAccountEnabled: jamfpro.TruePtr(),
PayloadConfigured: true,
LocalAdminAccountEnabled: true,
AdminUsername: "testadmin",
AdminPassword: "testpassword",
HiddenAdminAccount: jamfpro.TruePtr(),
LocalUserManaged: jamfpro.FalsePtr(),
HiddenAdminAccount: true,
LocalUserManaged: false,
UserAccountType: "ADMINISTRATOR",
VersionLock: 0,
PrefillPrimaryAccountInfoFeatureEnabled: jamfpro.TruePtr(),
PrefillPrimaryAccountInfoFeatureEnabled: true,
PrefillType: "UNKNOWN", // UNKNOWN / DEVICE_OWNER / CUSTOM
PrefillAccountFullName: "", // Required if PrefillType is CUSTOM
PrefillAccountUserName: "", // Required if PrefillType is CUSTOM
PreventPrefillInfoFromModification: jamfpro.FalsePtr(),
PreventPrefillInfoFromModification: false,
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,43 +21,43 @@ func main() {
// Define the payload for creating a new computer prestage
prestage := jamfpro.ResourceComputerPrestage{
DisplayName: "jamfpro-sdk-example-computerPrestageMinimum-config",
Mandatory: jamfpro.TruePtr(),
MDMRemovable: jamfpro.TruePtr(),
Mandatory: true,
MDMRemovable: true,
SupportPhoneNumber: "111-222-3333",
SupportEmailAddress: "email@company.com",
Department: "department name",
DefaultPrestage: jamfpro.FalsePtr(),
DefaultPrestage: false,
EnrollmentSiteId: "-1",
KeepExistingSiteMembership: jamfpro.FalsePtr(),
KeepExistingLocationInformation: jamfpro.FalsePtr(),
RequireAuthentication: jamfpro.FalsePtr(),
KeepExistingSiteMembership: false,
KeepExistingLocationInformation: false,
RequireAuthentication: false,
AuthenticationPrompt: "hello welcome to your enterprise managed macOS device",
PreventActivationLock: jamfpro.FalsePtr(),
EnableDeviceBasedActivationLock: jamfpro.FalsePtr(),
PreventActivationLock: false,
EnableDeviceBasedActivationLock: false,
DeviceEnrollmentProgramInstanceId: "1",
SkipSetupItems: jamfpro.ComputerPrestageSubsetSkipSetupItems{
Biometric: jamfpro.FalsePtr(),
TermsOfAddress: jamfpro.FalsePtr(),
FileVault: jamfpro.FalsePtr(),
ICloudDiagnostics: jamfpro.FalsePtr(),
Diagnostics: jamfpro.FalsePtr(),
Accessibility: jamfpro.FalsePtr(),
AppleID: jamfpro.FalsePtr(),
ScreenTime: jamfpro.FalsePtr(),
Siri: jamfpro.FalsePtr(),
DisplayTone: jamfpro.FalsePtr(),
Restore: jamfpro.FalsePtr(),
Appearance: jamfpro.FalsePtr(),
Privacy: jamfpro.FalsePtr(),
Payment: jamfpro.FalsePtr(),
Registration: jamfpro.FalsePtr(),
TOS: jamfpro.FalsePtr(),
ICloudStorage: jamfpro.FalsePtr(),
Location: jamfpro.FalsePtr(),
Intelligence: jamfpro.FalsePtr(),
EnableLockdownMode: jamfpro.FalsePtr(),
Welcome: jamfpro.FalsePtr(),
Wallpaper: jamfpro.FalsePtr(),
Biometric: false,
TermsOfAddress: false,
FileVault: false,
ICloudDiagnostics: false,
Diagnostics: false,
Accessibility: false,
AppleID: false,
ScreenTime: false,
Siri: false,
DisplayTone: false,
Restore: false,
Appearance: false,
Privacy: false,
Payment: false,
Registration: false,
TOS: false,
ICloudStorage: false,
Location: false,
Intelligence: false,
EnableLockdownMode: false,
Welcome: false,
Wallpaper: false,
},
LocationInformation: jamfpro.ComputerPrestageSubsetLocationInformation{
ID: "-1", // Required
Expand All @@ -73,8 +73,8 @@ func main() {
},
PurchasingInformation: jamfpro.ComputerPrestageSubsetPurchasingInformation{
ID: "-1", // Required
Leased: jamfpro.FalsePtr(),
Purchased: jamfpro.TruePtr(),
Leased: false,
Purchased: true,
AppleCareId: "",
PONumber: "",
Vendor: "",
Expand All @@ -88,33 +88,33 @@ func main() {
VersionLock: 0, // Not required for creates
},
EnrollmentCustomizationId: "0",
AutoAdvanceSetup: jamfpro.FalsePtr(),
InstallProfilesDuringSetup: jamfpro.TruePtr(),
AutoAdvanceSetup: false,
InstallProfilesDuringSetup: true,
PrestageInstalledProfileIds: []string{},
CustomPackageIds: []string{},
CustomPackageDistributionPointId: "-1", // -2 for all cloud distribution points , -1 for not used, then id for all distribution points
EnableRecoveryLock: jamfpro.FalsePtr(),
EnableRecoveryLock: false,
RecoveryLockPasswordType: "",
RecoveryLockPassword: "",
RotateRecoveryLockPassword: jamfpro.FalsePtr(),
RotateRecoveryLockPassword: false,
PrestageMinimumOsTargetVersionType: "NO_ENFORCEMENT", // NO_ENFORCEMENT / MINIMUM_OS_LATEST_VERSION / MINIMUM_OS_LATEST_MAJOR_VERSION / MINIMUM_OS_LATEST_MINOR_VERSION / MINIMUM_OS_SPECIFIC_VERSION
MinimumOsSpecificVersion: "",
SiteId: "-1",
VersionLock: 0, // Not required for creates
AccountSettings: jamfpro.ComputerPrestageSubsetAccountSettings{
PayloadConfigured: jamfpro.TruePtr(),
LocalAdminAccountEnabled: jamfpro.FalsePtr(),
PayloadConfigured: true,
LocalAdminAccountEnabled: false,
AdminUsername: "",
AdminPassword: "",
HiddenAdminAccount: jamfpro.FalsePtr(),
LocalUserManaged: jamfpro.FalsePtr(),
HiddenAdminAccount: false,
LocalUserManaged: false,
UserAccountType: "ADMINISTRATOR",
VersionLock: 0, // Not required for creates
PrefillPrimaryAccountInfoFeatureEnabled: jamfpro.FalsePtr(),
PrefillPrimaryAccountInfoFeatureEnabled: false,
PrefillType: "UNKNOWN",
PrefillAccountFullName: "",
PrefillAccountUserName: "",
PreventPrefillInfoFromModification: jamfpro.FalsePtr(),
PreventPrefillInfoFromModification: false,
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

func main() {
// Define the path to the JSON configuration file
configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
configFilePath := "/Users/Shared/GitHub/go-api-sdk-jamfpro/localtesting/clientconfig.json"

// Initialize the Jamf Pro client with the HTTP client configuration
client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
Expand All @@ -22,7 +22,6 @@ func main() {
// Define sorting parameters
// For more information on how to add parameters to this request, see docs/url_queries.md
params := url.Values{}
params.Add("sort", "name")

// Fetch computer prestages using the V3 API
prestages, err := client.GetComputerPrestages(params)
Expand Down
Loading
Loading