├── .github
├── CODEOWNERS
├── ISSUE_TEMPLATE
│ ├── BUG_REPORT.md
│ └── FEATURE_REQUEST.md
├── PULL_REQUEST_TEMPLATE.md
├── dependabot.yml
└── workflows
│ ├── codeql.yaml
│ ├── gosec-scan.yml
│ ├── linter.yml
│ ├── release-please.yml
│ └── test.yml
├── .gitignore
├── .vscode
└── settings.json
├── CHANGELOG.md
├── LICENSE
├── Makefile
├── README.md
├── deprecated
└── sdk
│ ├── classicapi_advanced_mobile_device_searches.go.deprecated
│ ├── classicapi_buildings.go.deprecated
│ ├── classicapi_computer_checkin.go.deprecated
│ ├── classicapi_computer_extension_attributes.go.deprecated
│ ├── classicapi_departments.go.deprecated
│ ├── classicapi_dock_items.go.deprecated
│ ├── classicapi_gsx_connection.go.deprecated
│ ├── classicapi_packages.go.deprecated
│ ├── classicapi_patch_policies.go.deprecated
│ ├── classicapi_scripts.go.deprecated
│ ├── classicapi_smtp_server.go.deprecated
│ ├── jamfproapi_jamf_protect.go
│ ├── jamfproapi_sso_settings.go
│ └── util_package_uploader.go.deprecated
├── docker-compose.yml
├── docs
├── client_configuration.md
├── debug_api_calls.md
├── debug_mode.md
├── index.md
├── screen_shots
│ └── debug_api_calls
│ │ ├── 001.png
│ │ ├── 002.png
│ │ ├── 003.png
│ │ ├── 004.png
│ │ ├── 005.png
│ │ ├── 006.png
│ │ ├── 007.png
│ │ ├── 008.png
│ │ ├── 009.png
│ │ └── 010.png
└── url_queries.md
├── examples
├── _templates
│ └── authentication
│ │ ├── example_client_setup_with_configfile.go
│ │ ├── example_client_setup_with_env_vars.go
│ │ └── example_client_setup_with_manual_conf.go
├── account_groups
│ ├── CreateAccountGroup
│ │ └── CreateAccountGroup.go
│ ├── DeleteAccountGroupByID
│ │ └── DeleteAccountGroupByID.go
│ ├── DeleteAccountGroupByName
│ │ └── DeleteAccountGroupByName.go
│ ├── DeleteAllAccountGroups
│ │ └── DeleteAllAccountGroups.go
│ ├── GetAccountGroupByID
│ │ └── GetAccountGroupByID.go
│ ├── GetAccountGroupByName
│ │ └── GetAccountGroupByName.go
│ ├── UpdateAccountGroupByID
│ │ └── UpdateAccountGroupByID.go
│ └── UpdateAccountGroupByName
│ │ └── UpdateAccountGroupByName.go
├── account_preferences
│ ├── GetAccountPreferences
│ │ └── GetAccountPreferences.go
│ └── UpdateAccountPreferences
│ │ └── UpdateAccountPreferences.go
├── accounts
│ ├── CreateAccountWithFullAccess
│ │ └── CreateAccountWithFullAccess.go
│ ├── CreateAccountWithGroupAccess
│ │ └── CreateAccountWithGroupAccess.go
│ ├── CreateAccountWithSiteAccess
│ │ └── CreateAccountWithSiteAccess.go
│ ├── DeleteAccountByID
│ │ └── DeleteAccountByID.go
│ ├── DeleteAccountByName
│ │ └── DeleteAccountByName.go
│ ├── GetAccountByID
│ │ └── GetAccountByID.go
│ ├── GetAccountByName
│ │ └── GetAccountByName.go
│ ├── GetAccounts
│ │ └── GetAccounts.go
│ ├── UpdateAccountByID
│ │ └── UpdateAccountByID.go
│ └── UpdateAccountByName
│ │ └── UpdateAccountByName.go
├── activationcode
│ ├── GetActivationCode
│ │ └── GetActivationCode.go
│ └── UpdateActivationCode
│ │ └── UpdateActivationCode.go
├── advanced_computer_searches
│ ├── CreateAdvancedComputerSearch
│ │ └── CreateAdvancedComputerSearch.go
│ ├── DeleteAdvancedComputerSearchByID
│ │ └── DeleteAdvancedComputerSearchByID.go
│ ├── DeleteAdvancedComputerSearchByName
│ │ └── DeleteAdvancedComputerSearchByName.go
│ ├── GetAdvancedComputerSearchByID
│ │ └── GetAdvancedComputerSearchByID.go
│ ├── GetAdvancedComputerSearches
│ │ └── GetAdvancedComputerSearches.go
│ ├── GetAdvancedComputerSearchesByName
│ │ └── GetAdvancedComputerSearchesByName.go
│ ├── UpdateAdvancedComputerSearchByID
│ │ └── UpdateAdvancedComputerSearchByID.go
│ └── UpdateAdvancedComputerSearchByName
│ │ └── UpdateAdvancedComputerSearchByName.go
├── advanced_mobile_device_searches
│ ├── CreateAdvancedMobileDeviceSearch
│ │ └── CreateAdvancedMobileDeviceSearch.go
│ ├── DeleteAdvancedMobileDeviceSearchByID
│ │ └── DeleteAdvancedMobileDeviceSearchByID.go
│ ├── GetAdvancedMobileDeviceSearchByID
│ │ └── GetAdvancedMobileDeviceSearchByID.go
│ ├── GetAdvancedMobileDeviceSearchByName
│ │ └── GetAdvancedMobileDeviceSearchByName.go
│ ├── GetAdvancedMobileDeviceSearches
│ │ └── GetAdvancedMobileDeviceSearches.go
│ └── UpdateAdvancedMobileDeviceSearchByID
│ │ └── UpdateAdvancedMobileDeviceSearchByID.go
├── advanced_user_searches
│ ├── CreateAdvancedUserSearch
│ │ └── CreateAdvancedUserSearch.go
│ ├── DeleteAdvancedUserSearchByID
│ │ └── DeleteAdvancedUserSearchByID.go
│ ├── DeleteAdvancedUserSearchByName
│ │ └── DeleteAdvancedUserSearchByName.go
│ ├── GetAdvancedUserSearchByID
│ │ └── GetAdvancedUserSearchByID.go
│ ├── GetAdvancedUserSearchByName
│ │ └── GetAdvancedUserSearchByName.go
│ ├── GetAdvancedUserSearches
│ │ └── GetAdvancedUserSearches.go
│ ├── UpdateAdvancedUserSearchByID
│ │ └── UpdateAdvancedUserSearchByID.go
│ └── UpdateAdvancedUserSearchByName
│ │ └── UpdateAdvancedUserSearchByName.go
├── allowed_file_extensions
│ ├── CreateAllowedFileExtension
│ │ └── CreateAllowedFileExtension.go
│ ├── DeleteAllowedFileExtensionByID
│ │ └── DeleteAllowedFileExtensionByID.go
│ ├── GetAllowedFileExtensionByID
│ │ └── GetAllowedFileExtensionByID.go
│ ├── GetAllowedFileExtensionByName
│ │ └── GetAllowedFileExtensionByName.go
│ └── GetAllowedFileExtensions
│ │ └── GetAllowedFileExtensions.go
├── bookmarks
│ ├── CreateBookmark
│ │ └── CreateBookmark.go
│ ├── DeleteBookmarkByID
│ │ └── DeleteBookmarkByID.go
│ ├── GetBookmarkByID
│ │ └── GetBookmarkByID.go
│ ├── GetBookmarkByName
│ │ └── GetBookmarkByName.go
│ ├── GetBookmarks
│ │ └── GetBookmarks.go
│ └── UpdateBookmarkByID
│ │ └── UpdateBookmarkByID.go
├── buildings
│ ├── CreateBuilding
│ │ └── CreateBuilding.go
│ ├── CreateBuildingResourceHistoryByID
│ │ └── CreateBuildingResourceHistoryByID.go
│ ├── DeleteBuildingByID
│ │ └── DeleteBuildingByID.go
│ ├── DeleteBuildingByNameByID
│ │ └── DeleteBuildingByNameByID.go
│ ├── DeleteMultipleBuildingsByID
│ │ └── DeleteMultipleBuildingsByID.go
│ ├── GetBuildingByID
│ │ └── GetBuildingByID.go
│ ├── GetBuildingResourceHistoryByID
│ │ └── GetBuildingResourceHistoryByID.go
│ ├── GetBuildings
│ │ └── GetBuildings.go
│ ├── GetBuildingsByName
│ │ └── GetBuildingsByName.go
│ ├── UpdateBuildingByID
│ │ └── UpdateBuildingByID.go
│ └── UpdateBuildingByName
│ │ └── UpdateBuildingByName.go
├── byoprofiles
│ ├── CreateBYOProfile
│ │ └── CreateBYOProfile.go
│ ├── DeleteBYOProfileByID
│ │ └── DeleteBYOProfileByID.go
│ ├── DeleteBYOProfileByName
│ │ └── DeleteBYOProfileByName.go
│ ├── GetBYOProfileByID
│ │ └── GetBYOProfileByID.go
│ ├── GetBYOProfileByName
│ │ └── GetBYOProfileByName.go
│ ├── GetBYOProfiles
│ │ └── GetBYOProfiles.go
│ ├── UpdateBYOProfileByID
│ │ └── UpdateBYOProfileByID.go
│ └── UpdateBYOProfileByName
│ │ └── UpdateBYOProfileByName.go
├── cache_settings
│ ├── GetCacheSettings
│ │ └── GetCacheSettings.go
│ └── UpdateCacheSettings
│ │ └── UpdateCacheSettings.go
├── categories
│ ├── CreateCategory
│ │ └── CreateCategory.go
│ ├── DeleteCategoryByID
│ │ └── DeleteCategoryByID.go
│ ├── DeleteCategoryByNameByID
│ │ └── DeleteCategoryByNameByID.go
│ ├── DeleteMultipleCategoriesByID
│ │ └── DeleteMultipleCategoriesByID.go
│ ├── GetCategories
│ │ └── GetCategories.go
│ ├── GetCategoryByID
│ │ └── GetCategoryByID.go
│ ├── GetCategoryNameByID
│ │ └── GetCategoryNameByID.go
│ ├── UpdateCategoryByID
│ │ └── UpdateCategoryByID.go
│ └── UpdateCategoryByName
│ │ └── UpdateCategoryByName.go
├── certificate_authority
│ └── GetActiveCertificateAuthority
│ │ └── GetActiveCertificateAuthority.go
├── classes
│ ├── CreateClassesByID
│ │ └── CreateClassesByID.go
│ ├── DeleteClassByID
│ │ └── DeleteClassByID.go
│ ├── DeleteClassByName
│ │ └── DeleteClassByName.go
│ ├── GetClasses
│ │ └── GetClasses.go
│ ├── GetClassesByID
│ │ └── GetClassesByID.go
│ ├── GetClassesByName
│ │ └── GetClassesByName.go
│ ├── UpdateClassesByID
│ │ └── UpdateClassesByID.go
│ └── UpdateClassesByName
│ │ └── UpdateClassesByName.go
├── client_checkin_settings
│ ├── GetClientCheckinSettings
│ │ └── GetClientCheckinSettings.go
│ └── UpdateClientCheckinSettings
│ │ └── UpdateClientCheckinSettings.go
├── cloud_azure
│ └── CreateCloudIdentityProvider
│ │ └── CreateCloudIdentityProvider.go
├── cloud_distribution_points
│ ├── GetCloudDistributionPoint
│ │ └── GetCloudDistributionPoint.go
│ ├── GetCloudDistributionPointTestConnection
│ │ └── GetCloudDistributionPointTestConnection.go
│ └── GetCloudDistributionPointUploadCapability
│ │ └── GetCloudDistributionPointUploadCapability.go
├── cloud_idp
│ ├── GetCloudIdentityProviderConfigurationByID
│ │ └── GetCloudIdentityProviderConfigurationByID.go
│ ├── GetCloudIdentityProviderConfigurationByName
│ │ └── GetCloudIdentityProviderConfigurationByName.go
│ └── GetCloudIdentityProviders
│ │ └── GetCloudIdentityProviders.go
├── cloud_ldap
│ ├── CreateCloudIdentityProviderLdap
│ │ └── CreateCloudIdentityProviderLdap.go
│ ├── DeleteCloudIdentityProviderLdapByID
│ │ └── DeleteCloudIdentityProviderLdapByID.go
│ ├── GetCloudIdentityProviderLdapByID
│ │ └── GetCloudIdentityProviderLdapByID.go
│ ├── GetDefaultIDPMappings
│ │ └── GetDefaultIDPMappings.go
│ ├── UpdateCloudIdentityProviderLdap
│ │ └── UpdateCloudIdentityProviderLdap.go
│ └── VerifyKeystore
│ │ └── VerifyKeystore.go
├── computer_extension_attributes
│ ├── CreateComputerExtensionAttributeWithPopUpMenu
│ │ └── CreateComputerExtensionAttributeWithPopUpMenu.go
│ ├── CreateComputerExtensionAttributeWithScript
│ │ └── CreateComputerExtensionAttributeWithScript.go
│ ├── CreateComputerExtensionAttributeWithTextField
│ │ └── CreateComputerExtensionAttributeWithTextField.go
│ ├── DeleteComputerExtensionAttributeByID
│ │ └── DeleteComputerExtensionAttributeByID.go
│ ├── DeleteMultipleComputerExtensionAttributeByID
│ │ └── DeleteMultipleComputerExtensionAttributeByID.go
│ ├── GetComputerExtensionAttributeByID
│ │ └── GetComputerExtensionAttributeByID.go
│ ├── GetComputerExtensionAttributeByName
│ │ └── GetComputerExtensionAttributeByName.go
│ ├── GetComputerExtensionAttributes
│ │ └── GetComputerExtensionAttributes.go
│ ├── UpdateComputerExtensionAttributeByID
│ │ └── UpdateComputerExtensionAttributeByID.go
│ └── UpdateComputerExtensionAttributeByName
│ │ └── UpdateComputerExtensionAttributeByName.go
├── computer_history
│ ├── GetComputerHistoryByComputerID
│ │ └── GetComputerHistoryByComputerID.go
│ ├── GetComputerHistoryByComputerIDAndDataSubset
│ │ └── GetComputerHistoryByComputerIDAndDataSubset.go
│ ├── GetComputerHistoryByComputerMACAddress
│ │ └── GetComputerHistoryByComputerMACAddress.go
│ ├── GetComputerHistoryByComputerMACAddressAndDataSubset
│ │ └── GetComputerHistoryByComputerMACAddressAndDataSubset.go
│ ├── GetComputerHistoryByComputerName
│ │ └── GetComputerHistoryByComputerName.go
│ ├── GetComputerHistoryByComputerNameAndDataSubset
│ │ └── GetComputerHistoryByComputerNameAndDataSubset.go
│ ├── GetComputerHistoryByComputerSerialNumber
│ │ └── GetComputerHistoryByComputerSerialNumber.go
│ ├── GetComputerHistoryByComputerSerialNumberAndDataSubset
│ │ └── GetComputerHistoryByComputerSerialNumberAndDataSubset.go
│ ├── GetComputerHistoryByComputerUDID
│ │ └── GetComputerHistoryByComputerUDID.go
│ └── GetComputerHistoryByComputerUDIDAndDataSubset
│ │ └── GetComputerHistoryByComputerUDIDAndDataSubset.go
├── computer_inventory
│ ├── DeleteAttachmentByIDAndComputerID
│ │ └── DeleteAttachmentByIDAndComputerID.go
│ ├── DeleteComputerInventoryByID
│ │ └── DeleteComputerInventoryByID.go
│ ├── EraseComputerByID
│ │ └── EraseComputerByID.go
│ ├── GetComputerFileVaultInventoryByID
│ │ └── GetComputerFileVaultInventoryByID.go
│ ├── GetComputerInventoryByID
│ │ └── GetComputerInventoryByID.go
│ ├── GetComputerInventoryByName
│ │ └── GetComputerInventoryByName.go
│ ├── GetComputerRecoveryLockPasswordByID
│ │ └── GetComputerRecoveryLockPasswordByID.go
│ ├── GetComputersFileVaultInventory
│ │ └── GetComputersFileVaultInventory.go
│ ├── GetComputersInventory
│ │ └── GetComputersInventory.go
│ ├── RemoveComputerMDMProfile
│ │ └── RemoveComputerMDMProfile.go
│ ├── UpdateComputerInventoryByID
│ │ ├── UpdateComputerInventoryByID.go
│ │ ├── payload-complex.json
│ │ └── payload.json
│ └── UploadAttachmentAndAssignToComputerByID
│ │ └── UploadAttachmentAndAssignToComputerByID.go
├── computer_inventory_collection
│ ├── GetComputerInventoryCollectionInformation
│ │ └── GetComputerInventoryCollectionInformation.go
│ └── UpdateComputerInventoryCollectionInformation
│ │ └── UpdateComputerInventoryCollectionInformation.go
├── computer_inventory_settings
│ ├── CreateComputerInventoryCollectionSettingsCustomPath
│ │ └── CreateComputerInventoryCollectionSettingsCustomPath.go
│ ├── DeleteComputerInventoryCollectionSettingsCustomPathByID
│ │ └── DeleteComputerInventoryCollectionSettingsCustomPathByID.go
│ ├── GetComputerInventoryCollectionSettings
│ │ └── GetComputerInventoryCollectionSettings.go
│ └── UpdateComputerInventoryCollectionSettings
│ │ └── UpdateComputerInventoryCollectionSettings.go
├── computer_invitations
│ ├── CreateComputerInvitation
│ │ └── CreateComputerInvitation.go
│ ├── DeleteComputerInvitationByID
│ │ └── DeleteComputerInvitationByID.go
│ ├── GetComputerInvitationByID
│ │ └── GetComputerInvitationByID.go
│ ├── GetComputerInvitations
│ │ └── GetComputerInvitations.go
│ └── GetComputerInvitationsByInvitationID
│ │ └── GetComputerInvitationsByInvitationID.go
├── computer_prestages
│ ├── CreateComputerPrestageFullConfig
│ │ └── CreateComputerPrestageFullConfig.go
│ ├── CreateComputerPrestageMinimumConfig
│ │ └── CreateComputerPrestageMinimumConfig.go
│ ├── DeleteComputerPrestageByID
│ │ └── DeleteComputerPrestageByID.go
│ ├── DeleteComputerPrestageByNameByID
│ │ └── DeleteComputerPrestageByNameByID.go
│ ├── GetComputerPrestageByID
│ │ └── GetComputerPrestageByID.go
│ ├── GetComputerPrestageByName
│ │ └── GetComputerPrestageByName.go
│ ├── GetComputerPrestages
│ │ └── GetComputerPrestages.go
│ ├── GetDeviceScopeForComputerPrestage
│ │ └── GetDeviceScopeForComputerPrestage.go
│ ├── UpdateComputerPrestageByID
│ │ └── UpdateComputerPrestageByID.go
│ ├── UpdateComputerPrestageByName
│ │ └── UpdateComputerPrestageByName.go
│ └── supportfiles
│ │ └── G2-RootCA4.orig.pem
├── computers
│ ├── CreateComputer
│ │ └── CreateComputer.go
│ ├── DeleteComputerByID
│ │ └── DeleteComputerByID.go
│ ├── DeleteComputerByName
│ │ └── DeleteComputerByName.go
│ ├── GetComputerByID
│ │ └── GetComputerByID.go
│ ├── GetComputerByName
│ │ └── GetComputerByName.go
│ ├── GetComputers
│ │ └── GetComputers.go
│ ├── UpdateComputerByID
│ │ └── UpdateComputerByID.go
│ └── UpdateComputerByName
│ │ └── UpdateComputerByName.go
├── conditional_access
│ └── GetConditionalAccessDeviceComplianceFeatureEnablement
│ │ └── GetConditionalAccessDeviceComplianceFeatureEnablement.go
├── csa
│ ├── DeleteCSAExchange
│ │ └── DeleteCSAExchange.go
│ ├── GetCSAExchangeInfo
│ │ └── GetCSAExchangeInfo.go
│ ├── InitCSAExchange
│ │ └── InitCSAExchange.go
│ └── RefreshCSATokenExchange
│ │ └── RefreshCSAExchange.go
├── declarative_device_management
│ ├── ForceDDMSync
│ │ └── ForceDDMSync.go
│ ├── GetDDMStatusItem
│ │ └── GetDDMStatusItem.go
│ └── GetDDMStatusItems
│ │ └── GetDDMStatusItems.go
├── departments
│ ├── CreateDepartment
│ │ └── CreateDepartment.go
│ ├── DeleteAllDepartments
│ │ └── DeleteAllDepartments.go
│ ├── DeleteDepartmentByID
│ │ └── DeleteDepartmentByID.go
│ ├── DeleteDepartmentByName
│ │ └── DeleteDepartmentByName.go
│ ├── GetDepartmentByID
│ │ └── GetDepartmentByID.go
│ ├── GetDepartmentByName
│ │ └── GetDepartmentByName.go
│ ├── GetDepartments
│ │ └── GetDepartments.go
│ ├── UpdateDepartmentByID
│ │ └── UpdateDepartmentByID.go
│ └── UpdateDepartmentByName
│ │ └── UpdateDepartmentByName.go
├── device_communication_settings
│ ├── GetDeviceCommunicationSettings
│ │ └── GetDeviceCommunicationSettings.go
│ └── UpdateDeviceCommunicationSettings
│ │ └── UpdateDeviceCommunicationSettings.go
├── device_enrollments
│ ├── CreateDeviceEnrollmentWithMDMServerToken
│ │ └── CreateDeviceEnrollmentWithMDMServerToken.go
│ ├── DeleteDeviceEnrollmentByID
│ │ └── DeleteDeviceEnrollmentByID.go
│ ├── GetDeviceEnrollmentByID
│ │ └── GetDeviceEnrollmentByID.go
│ ├── GetDeviceEnrollmentByName
│ │ └── GetDeviceEnrollmentByName.go
│ ├── GetDeviceEnrollmentHistory
│ │ └── GetDeviceEnrollmentHistory.go
│ ├── GetDeviceEnrollmentSyncStates
│ │ └── GetDeviceEnrollmentSyncStates.go
│ ├── GetDeviceEnrollments
│ │ └── GetDeviceEnrollments.go
│ ├── GetDeviceEnrollmentsPublicKey
│ │ └── GetDeviceEnrollmentsPublicKey.go
│ ├── UpdateDeviceEnrollmentMDMServerToken
│ │ └── UpdateDeviceEnrollmentMDMServerToken.go
│ └── UpdateDeviceEnrollmentMetadataByID
│ │ └── UpdateDeviceEnrollmentMetadataByID.go
├── directory_bindings
│ ├── CreateDirectoryBinding
│ │ └── CreateDirectoryBinding.go
│ ├── DeleteDirectoryBindingByID
│ │ └── DeleteDirectoryBindingByID.go
│ ├── DeleteDirectoryBindingByName
│ │ └── DeleteDirectoryBindingByName.go
│ ├── GetDirectoryBindingByID
│ │ └── GetDirectoryBindingByID.go
│ ├── GetDirectoryBindingByName
│ │ └── GetDirectoryBindingByName.go
│ ├── GetDirectoryBindings
│ │ └── GetDirectoryBindings.go
│ ├── UpdateDirectoryBindingByID
│ │ └── UpdateDirectoryBindingByID.go
│ └── UpdateDirectoryBindingByName
│ │ └── UpdateDirectoryBindingByName.go
├── disk_encryption_configurations
│ ├── CreateDiskEncryptionConfigurationIndividualRecoveryKey
│ │ └── CreateDiskEncryptionConfigurationIndividualRecoveryKey.go
│ ├── CreateDiskEncryptionConfigurationInstitutionalRecoveryKey
│ │ └── CreateDiskEncryptionConfigurationInstitutionalRecoveryKey.go
│ ├── DeleteDiskEncryptionConfigurationByID
│ │ └── DeleteDiskEncryptionConfigurationByID.go
│ ├── DeleteDiskEncryptionConfigurationByName
│ │ └── DeleteDiskEncryptionConfigurationByName.go
│ ├── GetDiskEncryptionConfigurationByID
│ │ └── GetDiskEncryptionConfigurationByID.go
│ ├── GetDiskEncryptionConfigurationByName
│ │ └── GetDiskEncryptionConfigurationByName.go
│ ├── GetDiskEncryptionConfigurations
│ │ └── GetDiskEncryptionConfigurations.go
│ ├── UpdateDiskEncryptionConfigurationByIDIndividualRecoveryKey
│ │ └── UpdateDiskEncryptionConfigurationByIDIndividualRecoveryKey.go
│ └── UpdateDiskEncryptionConfigurationByNameIndividualRecoveryKey
│ │ └── UpdateDiskEncryptionConfigurationByNameIndividualRecoveryKey.go
├── dock_items
│ ├── CreateDockItems
│ │ └── CreateDockItems.go
│ ├── DeleteAllDockItems
│ │ └── DeleteAllDockItems.go
│ ├── DeleteDockItemsByID
│ │ └── DeleteDockItemsByID.go
│ ├── DeleteDockItemsByName
│ │ └── DeleteDockItemsByName.go
│ ├── GetDockItems
│ │ └── GetDockItems.go
│ ├── GetDockItemsByID
│ │ └── GetDockItemsByID.go
│ ├── GetDockItemsByName
│ │ └── GetDockItemsByName.go
│ ├── UpdateDockItemsByID
│ │ └── UpdateDockItemByID.go
│ └── UpdateDockItemsByName
│ │ └── UpdateDockItemByName.go
├── ebooks
│ ├── CreateEbook
│ │ └── CreateEbook.go
│ ├── DeleteEbookByID
│ │ └── DeleteEbookByID.go
│ ├── DeleteEbookByName
│ │ └── DeleteEbookByName.go
│ ├── GetEbooks
│ │ └── GetEbooks.go
│ ├── GetEbooksByID
│ │ └── GetEbooksByID.go
│ ├── GetEbooksByName
│ │ └── GetEbooksByName.go
│ ├── GetEbooksByNameAndDataSubset
│ │ └── GetEbooksByNameAndDataSubset.go
│ ├── UpdateEbookByID
│ │ └── UpdateEbookByID.go
│ └── UpdateEbookByName
│ │ └── UpdateEbookByName.go
├── engage_settings
│ ├── GetEngageSettings
│ │ └── GetEngageSettings.go
│ └── UpdateEngageSettings
│ │ └── UpdateEngageSettings.go
├── enrollment
│ ├── CreateAccountDrivenUserEnrollmentAccessGroup
│ │ └── CreateAccountDrivenUserEnrollmentAccessGroup.go
│ ├── DeleteMultipleEnrollmentMessagesByLanguageIDs
│ │ └── DeleteMultipleEnrollmentMessagesByLanguageIDs.go
│ ├── GetAccountDrivenUserEnrollmentAccessGroupByID
│ │ └── GetAccountDrivenUserEnrollmentAccessGroupByID.go
│ ├── GetAccountDrivenUserEnrollmentAccessGroupByName
│ │ └── GetAccountDrivenUserEnrollmentAccessGroupByName.go
│ ├── GetAccountDrivenUserEnrollmentAccessGroups
│ │ └── GetAccountDrivenUserEnrollmentAccessGroups.go
│ ├── GetEnrollment
│ │ └── GetEnrollment.go
│ ├── GetEnrollmentHistory
│ │ └── GetEnrollmentHistory.go
│ ├── GetEnrollmentLanguageCodes
│ │ └── GetEnrollmentLanguageCodes.go
│ ├── GetEnrollmentMessageByLanguageID
│ │ └── GetEnrollmentMessageByLanguageID.go
│ ├── GetEnrollmentMessages
│ │ └── GetEnrollmentMessages.go
│ ├── UpdateAccountDrivenUserEnrollmentAccessGroupByID
│ │ └── UpdateAccountDrivenUserEnrollmentAccessGroupByID.go
│ ├── UpdateEnrollment
│ │ └── UpdateEnrollment.go
│ └── UpdateEnrollmentMessageByLanguageID
│ │ └── UpdateEnrollmentMessageByLanguageID.go
├── enrollment_customizations
│ ├── CreateEnrollmentCustomizationWithLDAPPrestagePane
│ │ └── CreateEnrollmentCustomizationWithLDAPPrestagePane.go
│ ├── CreateEnrollmentCustomizationWithSSOPrestagePane
│ │ └── CreateEnrollmentCustomizationWithSSOPrestagePane.go
│ ├── CreateEnrollmentCustomizationWithTextPrestagePane
│ │ └── CreateEnrollmentCustomizationWithTextPrestagePane.go
│ ├── DeleteEnrollmentCustomization
│ │ └── DeleteEnrollmentCustomizationByID.go
│ ├── GetEnrollmentCustomizationByID
│ │ └── GetEnrollmentCustomizationByID.go
│ ├── GetEnrollmentCustomizationByName
│ │ └── GetEnrollmentCustomizationByName.go
│ ├── GetEnrollmentCustomizations
│ │ └── GetEnrollmentCustomizations.go
│ ├── GetLDAPPrestagePaneByID
│ │ └── GetLDAPPrestagePaneByID.go
│ ├── GetPrestagePanes
│ │ └── GetPrestagePanes.go
│ ├── GetSSOPrestagePaneByID
│ │ └── GetSSOPrestagePaneByID.go
│ ├── GetTextPrestagePaneByID
│ │ └── GetTextPrestagePaneByID.go
│ ├── UpdateEnrollmentCustomizationByID
│ │ └── UpdateEnrollmentCustomizationByID.go
│ ├── UpdateEnrollmentCustomizationPrestagePanesWithLDAPandText
│ │ └── UpdateEnrollmentCustomizationPrestagePanesWithLDAPandText.go
│ ├── UpdateEnrollmentCustomizationPrestagePanesWithSSOandText
│ │ └── UpdateEnrollmentCustomizationPrestagePanesWithSSOandText.go
│ ├── UpdateLDAPPrestagePaneByID
│ │ └── UpdateLDAPPrestagePaneByID.go
│ ├── UpdateSSOPrestagePaneByID
│ │ └── UpdateSSOPrestagePaneByID.go
│ ├── UpdateTextPrestagePaneByID
│ │ └── UpdateTextPrestagePaneByID.go
│ └── UploadEnrollmentCustomizationsImage
│ │ ├── UploadEnrollmentCustomizationsImage.go
│ │ └── self_service.png
├── enrollment_settings
│ ├── GetADUESessionTokenSettings
│ │ └── GetADUESessionTokenSettings.go
│ ├── GetEnrollmentSettings
│ │ └── GetEnrollmentSettings.go
│ └── UpdateADUESessionTokenSettings
│ │ └── UpdateADUESessionTokenSettings.go
├── file_share_distribution_points
│ ├── CreateFileShareDistributionPoint
│ │ └── CreateFileShareDistributionPoint.go
│ ├── DeleteFileShareDistributionPointByID
│ │ └── DeleteFileShareDistributionPointByID.go
│ ├── DeleteFileShareDistributionPointByName
│ │ └── DeleteFileShareDistributionPointByName.go
│ ├── GetFileShareDistributionPointByID
│ │ └── GetFileShareDistributionPointByID.go
│ ├── GetFileShareDistributionPointByName
│ │ └── GetFileShareDistributionPointByName.go
│ ├── GetFileShareDistributionPoints
│ │ └── GetFileShareDistributionPoints.go
│ ├── UpdateFileShareDistributionPointByID
│ │ └── UpdateFileShareDistributionPointByID.go
│ └── UpdateFileShareDistributionPointByName
│ │ └── UpdateFileShareDistributionPointByName.go
├── file_uploads
│ ├── CreateFileAttachmentsEbooks
│ │ └── CreateFileAttachmentsEbooks.go
│ ├── CreateFileAttachmentsPolicies
│ │ └── CreateFileAttachmentsPolicies.go
│ └── CreateFileAttachmentsPrinters
│ │ └── CreateFileAttachmentsPrinters.go
├── gsx_connection
│ ├── GetGSXConnectionInformation
│ │ └── GetGSXConnectionInformation.go
│ └── UpdateGSXConnectionInformation
│ │ └── UpdateGSXConnectionInformation.go
├── health_check
│ └── GetHealthCheck
│ │ └── GetHealthCheck.go
├── ibeacons
│ ├── CreateIBeacon
│ │ └── CreateIBeacon.go
│ ├── DeleteIBeaconByID
│ │ └── DeleteIBeaconByID.go
│ ├── DeleteIBeaconByName
│ │ └── DeleteIBeaconByName.go
│ ├── GetIBeaconByID
│ │ └── GetIBeaconByID.go
│ ├── GetIBeaconByName
│ │ └── GetIBeaconByName.go
│ ├── GetIBeacons
│ │ └── GetIBeacons.go
│ ├── UpdateIBeaconByID
│ │ └── UpdateIBeaconByID.go
│ └── UpdateIBeaconByName
│ │ └── UpdateIBeaconByName.go
├── icon
│ ├── GetIconByID
│ │ └── GetIconByID.go
│ └── UploadIcon
│ │ ├── UploadIcon.go
│ │ └── cat.png
├── jamf_api_integrations
│ ├── CreateApiIntegration
│ │ └── CreateApiIntegration.go
│ ├── DeleteApiIntegrationByID
│ │ └── DeleteApiIntegrationByID.go
│ ├── DeleteApiIntegrationByName
│ │ └── DeleteApiIntegrationByName.go
│ ├── GetApiIntegrationByID
│ │ └── GetApiIntegrationByID.go
│ ├── GetApiIntegrationByName
│ │ └── GetApiIntegrationByName.go
│ ├── GetApiIntegrations
│ │ └── GetApiIntegrations.go
│ ├── RefreshClientCredentialsByApiRoleID
│ │ └── RefreshClientCredentialsByApiRoleID.go
│ ├── UpdateApiIntegrationByID
│ │ └── UpdateApiIntegrationByID.go
│ └── UpdateApiIntegrationByName
│ │ └── UpdateApiIntegrationByName.go
├── jamf_api_privileges
│ ├── GetJamfAPIPrivileges
│ │ └── GetJamfAPIPrivileges.go
│ └── GetJamfAPIRolePrivilegeByName
│ │ └── GetJamfAPIRolePrivilegeByName.go
├── jamf_api_roles
│ ├── CreateJamfApiRole
│ │ └── CreateJamfApiRole.go
│ ├── DeleteJamfApiRoleByID
│ │ └── DeleteJamfApiRoleByID.go
│ ├── DeleteJamfApiRoleByName
│ │ └── DeleteJamfApiRoleByName.go
│ ├── GetJamfAPIRoles
│ │ └── GetJamfAPIRoles.go
│ ├── GetJamfApiRolesByID
│ │ └── GetJamfApiRolesByID.go
│ ├── GetJamfApiRolesNameById
│ │ └── GetJamfApiRolesNameById.go
│ ├── UpdateJamfApiRoleByID
│ │ └── UpdateJamfApiRoleByID.go
│ └── UpdateJamfApiRoleByName
│ │ └── UpdateJamfApiRoleByName.go
├── jamf_app_catalog_app_installers
│ ├── AcceptJamfAppCatalogAppInstallerTermsAndConditions
│ │ └── AcceptJamfAppCatalogAppInstallerTermsAndConditions.go
│ ├── CreateJamfAppCatalogDeployment
│ │ └── CreateJamfAppCatalogDeployment.go
│ ├── DeleteJamfAppCatalogDeploymentByID
│ │ └── DeleteJamfAppCatalogDeploymentByID.go
│ ├── GetJamfAppCatalogAppInstallerByID
│ │ └── GetJamfAppCatalogAppInstallerByID.go
│ ├── GetJamfAppCatalogAppInstallerByName
│ │ └── GetJamfAppCatalogAppInstallerByName.go
│ ├── GetJamfAppCatalogAppInstallerByTitleID
│ │ └── GetJamfAppCatalogAppInstallerByTitleID.go
│ ├── GetJamfAppCatalogAppInstallerByTitleName
│ │ └── GetJamfAppCatalogAppInstallerByTitleName.go
│ ├── GetJamfAppCatalogAppInstallerGlobalSettings
│ │ └── GetJamfAppCatalogAppInstallerGlobalSettings.go
│ ├── GetJamfAppCatalogAppInstallerTermsAndConditionsStatus
│ │ └── GetJamfAppCatalogAppInstallerTermsAndConditionsStatus.go
│ ├── GetJamfAppCatalogAppInstallerTitles
│ │ └── GetJamfAppCatalogAppInstallerTitles.go
│ ├── UpdateJamfAppCatalogAppInstallerGlobalSettings
│ │ └── UpdateJamfAppCatalogAppInstallerGlobalSettings.go
│ └── UpdateJamfAppCatalogDeploymentByID
│ │ └── UpdateJamfAppCatalogDeploymentByID.go
├── jamf_connect
│ ├── GetJamfConnectConfigProfileByConfigProfileUUID
│ │ └── GetJamfConnectConfigProfileByConfigProfileUUID.go
│ ├── GetJamfConnectConfigProfileByID
│ │ └── GetJamfConnectConfigProfileByID.go
│ ├── GetJamfConnectConfigProfileByName
│ │ └── GetJamfConnectConfigProfileByName.go
│ ├── GetJamfConnectConfigProfiles
│ │ └── GetJamfConnectConfigProfiles.go
│ ├── GetJamfConnectSettings
│ │ └── GetJamfConnectSettings.go
│ ├── RetryJamfConnectDeploymentTasksByConfigProfileUUID
│ │ └── RetryJamfConnectDeploymentTasksByConfigProfileUUID.go
│ ├── UpdateJamfConnectConfigProfileByConfigProfileUUID
│ │ └── UpdateJamfConnectConfigProfileByConfigProfileUUID.go
│ └── UpdateJamfConnectConfigProfileByID
│ │ └── UpdateJamfConnectConfigProfileByID.go
├── jamf_content_distribution_server
│ ├── DeleteJCDS2PackageByFileName
│ │ └── DeleteJCDS2PackageByFileName.go
│ ├── DoPackageUpload
│ │ └── DoPackageUpload.go
│ ├── GetJCDS2PackageURIByName
│ │ └── GetJCDS2PackageURIByName.go
│ ├── GetJCDS2Packages
│ │ └── GetJCDS2Packages.go
│ ├── GetJCDS2Properties
│ │ └── GetJCDS2Properties.go
│ ├── RefreshJCDS2Inventory
│ │ └── RefreshJCDS2Inventory.go
│ └── RenewJCDS2Credentials
│ │ └── RenewJCDS2Credentials.go
├── jamf_pro_information
│ └── GetJamfProInformation
│ │ └── GetJamfProInformation.go
├── jamf_pro_server_url
│ ├── GetJamfProServerUrlSettings
│ │ └── GetJamfProServerUrlSettings.go
│ └── UpdateJamfProServerUrlSettings
│ │ └── UpdateJamfProServerUrlSettings.go
├── jamf_pro_system_initialization
│ ├── InitializeDatabaseConnection
│ │ └── InitializeDatabaseConnection.go
│ └── InitializeJamfProServer
│ │ └── InitializeJamfProServer.go
├── jamf_pro_version
│ └── GetJamfProVersion
│ │ └── GetJamfProVersion.go
├── jamf_protect
│ ├── CreateJamfProtectIntegration
│ │ └── CreateJamfProtectIntegration.go
│ ├── DeleteJamfProtectIntegration
│ │ └── DeleteJamfProtectIntegration.go
│ ├── GetJamfProtectHistory
│ │ └── GetJamfProtectHistory.go
│ ├── GetJamfProtectPlans
│ │ └── GetJamfProtectPlans.go
│ ├── GetJamfProtectSettings
│ │ └── GetJamfProtectSettings.go
│ ├── SyncJamfProtectPlans
│ │ └── SyncJamfProtectPlans.go
│ └── UpdateJamfProtectIntegrationSettings
│ │ └── UpdateJamfProtectIntegrationSettings.go
├── ldap_servers
│ ├── CreateLDAPServer
│ │ └── CreateLDAPServer.go
│ ├── DeleteLDAPServerByID
│ │ └── DeleteLDAPServerByID.go
│ ├── DeleteLDAPServerByName
│ │ └── DeleteLDAPServerByName.go
│ ├── GetLDAPServerByID
│ │ └── GetLDAPServerByID.go
│ ├── GetLDAPServerByIDAndGroupDataSubset
│ │ └── GetLDAPServerByIDAndGroupDataSubset.go
│ ├── GetLDAPServerByIDAndUserDataSubset
│ │ └── GetLDAPServerByIDAndUserDataSubset.go
│ ├── GetLDAPServerByIDAndUserMembershipInGroupDataSubset
│ │ └── GetLDAPServerByIDAndUserMembershipInGroupDataSubset.go
│ ├── GetLDAPServerByName
│ │ └── GetLDAPServerByName.go
│ ├── GetLDAPServerByNameAndGroupDataSubset
│ │ └── GetLDAPServerByNameAndGroupDataSubset.go
│ ├── GetLDAPServerByNameAndUserDataSubset
│ │ └── GetLDAPServerByNameAndUserDataSubset.go
│ ├── GetLDAPServerByNameAndUserMembershipInGroupDataSubset
│ │ └── GetLDAPServerByNameAndUserMembershipInGroupDataSubset.go
│ ├── GetLDAPServers
│ │ └── GetLDAPServers.go
│ ├── UpdateLDAPServerByID
│ │ └── UpdateLDAPServerByID.go
│ └── UpdateLDAPServerByName
│ │ └── UpdateLDAPServerByName.go
├── licensed_software
│ ├── CreateLicensedSoftware
│ │ └── CreateLicensedSoftware.go
│ ├── DeleteLicensedSoftwareByID
│ │ └── DeleteLicensedSoftwareByID.go
│ ├── DeleteLicensedSoftwareByName
│ │ └── DeleteLicensedSoftwareByName.go
│ ├── GetLicensedSoftware
│ │ └── GetLicensedSoftware.go
│ ├── GetLicensedSoftwareByID
│ │ └── GetLicensedSoftwareByID.go
│ ├── GetLicensedSoftwareByName
│ │ └── GetLicensedSoftwareByName.go
│ ├── UpdateLicensedSoftwareByID
│ │ └── UpdateLicensedSoftwareByID.go
│ └── UpdateLicensedSoftwareByName
│ │ └── UpdateLicensedSoftwareByName.go
├── local_administrator_password
│ ├── GetCurrentLocalAdminPasswordForSpecifiedUsernameOnAClient
│ │ └── GetCurrentLocalAdminPasswordForSpecifiedUsernameOnAClient.go
│ ├── GetListOfPendingLapsRotations
│ │ └── GetListOfPendingLapsRotations.go
│ ├── GetLocalAdminPasswordCapableAccountsByClientManagementID
│ │ └── GetLocalAdminPasswordCapableAccountsByClientManagementID.go
│ ├── GetLocalAdminPasswordFullHistoryByClientManagementID
│ │ └── GetLocalAdminPasswordFullHistoryByClientManagementID.go
│ ├── GetLocalAdminPasswordSettings
│ │ └── GetLocalAdminPasswordSettings.go
│ ├── GetLocalAdminPasswordViewedHistory
│ │ └── GetLocalAdminPasswordViewedHistory.go
│ ├── SetLocalAdminPasswordByClientManagementID
│ │ └── SetLocalAdminPasswordByClientManagementID.go
│ └── UpdateLocalAdminPasswordSettings
│ │ └── UpdateLocalAdminPasswordSettings.go
├── locales
│ └── GetLocales
│ │ └── GetLocales.go
├── log_flushing
│ ├── DeleteLogFlushingTaskByID
│ │ └── DeleteLogFlushingTaskByID.go
│ ├── GetLogFlushingSettings
│ │ └── GetLogFlushingSettings.go
│ ├── GetLogFlushingTaskByID
│ │ └── GetLogFlushingTaskByID.go
│ ├── GetLogFlushingTasks
│ │ └── GetLogFlushingTasks.go
│ └── QueueLogFlushingTask
│ │ └── QueueLogFlushingTask.go
├── login_customization
│ ├── GetLoginCustomization
│ │ └── GetLoginCustomization.go
│ └── UpdateLoginCustomization
│ │ └── UpdateLoginCustomization.go
├── mac_applications
│ ├── CreateMacApplication
│ │ └── CreateMacApplication.go
│ ├── DeleteMacApplicationByID
│ │ └── DeleteMacApplicationByID.go
│ ├── DeleteMacApplicationByName
│ │ └── DeleteMacApplicationByName.go
│ ├── GetMacApplicationByID
│ │ └── GetMacApplicationByID.go
│ ├── GetMacApplicationByIDAndDataSubset
│ │ └── GetMacApplicationByIDAndDataSubset.go
│ ├── GetMacApplicationByName
│ │ └── GetMacApplicationByName.go
│ ├── GetMacApplicationByNameAndDataSubset
│ │ └── GetMacApplicationByNameAndDataSubset.go
│ ├── GetMacApplications
│ │ └── GetMacApplications.go
│ ├── UpdateMacApplicationByID
│ │ └── UpdateMacApplicationByID.go
│ └── UpdateMacApplicationByName
│ │ └── UpdateMacApplicationByName.go
├── macos_configuration_profile_custom_settings
│ ├── CreateConfigProfileWithCustomSettingsSchema
│ │ └── CreateConfigProfileWithCustomSettingsSchema.go
│ ├── CreateConfigProfileWithCustomSettingsSchemaCISlvl1
│ │ ├── CreateConfigProfileWithCustomSettingsSchemaCISlvl1.go
│ │ └── cis_lvl1.json
│ ├── GetConfigProfileByPayloadUUID
│ │ └── GetConfigProfileByPayloadUUID.go
│ └── GetCustomSettingsSchemaList
│ │ └── GetCustomSettingsSchemaList.go
├── macos_configuration_profiles
│ ├── CreateMacOSConfigurationProfile
│ │ └── CreateMacOSConfigurationProfile.go
│ ├── DeleteAllMacOSConfigurationProfiles
│ │ └── DeleteAllMacOSConfigurationProfiles.go
│ ├── DeleteMacOSConfigurationProfileByID
│ │ └── DeleteMacOSConfigurationProfileByID.go
│ ├── DeleteMacOSConfigurationProfileByName
│ │ └── DeleteMacOSConfigurationProfileByName.go
│ ├── GetMacOSConfigurationProfileByID
│ │ └── GetMacOSConfigurationProfileByID.go
│ ├── GetMacOSConfigurationProfileByName
│ │ └── GetMacOSConfigurationProfileByName.go
│ ├── GetMacOSConfigurationProfileNameByID
│ │ └── GetMacOSConfigurationProfileNameByID.go
│ ├── GetMacOSConfigurationProfiles
│ │ └── GetMacOSConfigurationProfiles.go
│ ├── UpdateMacOSConfigurationProfileByID
│ │ └── UpdateMacOSConfigurationProfileByID.go
│ ├── UpdateMacOSConfigurationProfileByIDWithFileUpload
│ │ ├── DOCK.mobileconfig
│ │ └── UpdateMacOSConfigurationProfileByIDWithFileUpload.go
│ └── UpdateMacOSConfigurationProfileByName
│ │ └── UpdateMacOSConfigurationProfileByName.go
├── managed_software_updates
│ ├── CreateManagedSoftwareUpdatePlanByDeviceID
│ │ └── CreateManagedSoftwareUpdatePlanByDeviceID.go
│ ├── CreateManagedSoftwareUpdatePlanByGroupID
│ │ └── CreateManagedSoftwareUpdatePlanByGroupID.go
│ ├── GetManagedSoftwareUpdateFeatureToggle
│ │ └── GetManagedSoftwareUpdateFeatureToggle.go
│ ├── GetManagedSoftwareUpdatePlans
│ │ └── GetManagedSoftwareUpdatePlans.go
│ ├── GetManagedSoftwareUpdatePlansByGroupID
│ │ └── GetManagedSoftwareUpdatePlansByGroupID.go
│ ├── GetManagedSoftwareUpdates
│ │ └── GetManagedSoftwareUpdates.go
│ └── UpdateManagedSoftwareUpdateFeatureToggle
│ │ └── UpdateManagedSoftwareUpdateFeatureToggle.go
├── mdm
│ ├── SendMDMCommandForCreationAndQueuing
│ │ └── SendMDMCommandForCreationAndQueuing.go
│ ├── SendMDMCommandForMDMProfileRenewal
│ │ └── SendMDMCommandForMDMProfileRenewal.go
│ └── SendMDMCommandForPackageDeployment
│ │ └── SendMDMCommandForPackageDeployment.go
├── mobile_device_applications
│ ├── CreateMobileDeviceApplication
│ │ └── CreateMobileDeviceApplication.go
│ ├── DeleteMobileDeviceApplicationByBundleID
│ │ └── DeleteMobileDeviceApplicationByBundleID.go
│ ├── DeleteMobileDeviceApplicationByBundleIDAndVersion
│ │ └── DeleteMobileDeviceApplicationByBundleIDAndVersion.go
│ ├── DeleteMobileDeviceApplicationByName
│ │ └── DeleteMobileDeviceApplicationByName.go
│ ├── DeleteMobileDeviceApplicationpByID
│ │ └── DeleteMobileDeviceApplicationpByID.go
│ ├── GetMobileDeviceApplicationByAppBundleID
│ │ └── GetMobileDeviceApplicationByAppBundleID.go
│ ├── GetMobileDeviceApplicationByAppBundleIDAndVersion
│ │ └── GetMobileDeviceApplicationByAppBundleIDAndVersion.go
│ ├── GetMobileDeviceApplicationByID
│ │ └── GetMobileDeviceApplicationByID.go
│ ├── GetMobileDeviceApplicationByIDAndDataSubset
│ │ └── GetMobileDeviceApplicationByIDAndDataSubset.go
│ ├── GetMobileDeviceApplicationByName
│ │ └── GetMobileDeviceApplicationByName.go
│ ├── GetMobileDeviceApplicationByNameAndDataSubset
│ │ └── GetMobileDeviceApplicationByNameAndDataSubset.go
│ ├── GetMobileDeviceApplications
│ │ └── GetMobileDeviceApplications.go
│ ├── UpdateMobileDeviceApplicationByApplicationBundleID
│ │ └── UpdateMobileDeviceApplicationByApplicationBundleID.go
│ ├── UpdateMobileDeviceApplicationByID
│ │ └── UpdateMobileDeviceApplicationByID.go
│ ├── UpdateMobileDeviceApplicationByIDAndAppVersion
│ │ └── UpdateMobileDeviceApplicationByIDAndAppVersion.go
│ └── UpdateMobileDeviceApplicationByName
│ │ └── UpdateMobileDeviceApplicationByName.go
├── mobile_device_configuration_profiles
│ ├── CreateMobileDeviceConfigurationProfile
│ │ └── CreateMobileDeviceConfigurationProfile.go
│ ├── DeleteMobileDeviceConfigurationProfileByID
│ │ └── DeleteMobileDeviceConfigurationProfileByID.go
│ ├── DeleteMobileDeviceConfigurationProfileByName
│ │ └── DeleteMobileDeviceConfigurationProfileByName.go
│ ├── GetMobileDeviceConfigurationProfileByID
│ │ └── GetMobileDeviceConfigurationProfileByID.go
│ ├── GetMobileDeviceConfigurationProfileByIDWithSubset
│ │ └── GetMobileDeviceConfigurationProfileByIDWithSubset.go
│ ├── GetMobileDeviceConfigurationProfileByName
│ │ └── GetMobileDeviceConfigurationProfileByName.go
│ ├── GetMobileDeviceConfigurationProfileByNameWithSubset
│ │ └── GetMobileDeviceConfigurationProfileByNameWithSubset.go
│ ├── GetMobileDeviceConfigurationProfiles
│ │ └── GetMobileDeviceConfigurationProfiles.go
│ ├── UpdateMobileDeviceConfigurationProfileByID
│ │ └── UpdateMobileDeviceConfigurationProfileByID.go
│ └── UpdateMobileDeviceConfigurationProfileByName
│ │ └── UpdateMobileDeviceConfigurationProfileByName.go
├── mobile_device_enrollment_groups
│ ├── CreateMobileDeviceGroupSmart
│ │ └── CreateMobileDeviceGroupSmart.go
│ ├── CreateMobileDeviceGroupStatic
│ │ └── CreateMobileDeviceGroupStatic.go
│ ├── DeleteMobileDeviceGroupByID
│ │ └── DeleteMobileDeviceGroupByID.go
│ ├── DeleteMobileDeviceGroupByName
│ │ └── DeleteMobileDeviceGroupByName.go
│ ├── GetMobileDeviceGroups
│ │ └── GetMobileDeviceGroups.go
│ ├── GetMobileDeviceGroupsByID
│ │ └── GetMobileDeviceGroupsByID.go
│ ├── GetMobileDeviceGroupsByName
│ │ └── GetMobileDeviceGroupsByName.go
│ ├── UpdateMobileDeviceGroupByIDSmart
│ │ └── UpdateMobileDeviceGroupByIDSmart.go
│ ├── UpdateMobileDeviceGroupByIDStatic
│ │ └── UpdateMobileDeviceGroupByIDStatic.go
│ ├── UpdateMobileDeviceGroupByIDStaticGroupAdditions
│ │ └── UpdateMobileDeviceGroupByIDStaticGroupAdditions.go
│ ├── UpdateMobileDeviceGroupByIDStaticGroupDeletions
│ │ └── UpdateMobileDeviceGroupByIDStaticGroupDeletions.go
│ ├── UpdateMobileDeviceGroupByNameSmart
│ │ └── UpdateMobileDeviceGroupByNameSmart.go
│ └── UpdateMobileDeviceGroupByNameStatic
│ │ └── UpdateMobileDeviceGroupByNameStatic.go
├── mobile_device_enrollment_profiles
│ ├── CreateMobileDeviceEnrollmentProfile
│ │ └── CreateMobileDeviceEnrollmentProfile.go
│ ├── DeleteMobileDeviceEnrollmentProfileByID
│ │ └── DeleteMobileDeviceEnrollmentProfileByID.go
│ ├── DeleteMobileDeviceEnrollmentProfileByInvitation
│ │ └── DeleteMobileDeviceEnrollmentProfileByInvitation.go
│ ├── DeleteMobileDeviceEnrollmentProfileByName
│ │ └── DeleteMobileDeviceEnrollmentProfileByName.go
│ ├── GetMobileDeviceEnrollmentProfileByID
│ │ └── GetMobileDeviceEnrollmentProfileByID.go
│ ├── GetMobileDeviceEnrollmentProfileByIDWithSubset
│ │ └── GetMobileDeviceEnrollmentProfileByIDWithSubset.go
│ ├── GetMobileDeviceEnrollmentProfileByName
│ │ └── GetMobileDeviceEnrollmentProfileByName.go
│ ├── GetMobileDeviceEnrollmentProfileByNameWithSubset
│ │ └── GetMobileDeviceEnrollmentProfileByNameWithSubset.go
│ ├── GetMobileDeviceEnrollmentProfiles
│ │ └── GetMobileDeviceEnrollmentProfiles.go
│ ├── GetProfileByInvitation
│ │ └── GetProfileByInvitation.go
│ ├── UpdateMobileDeviceEnrollmentProfileByID
│ │ └── UpdateMobileDeviceEnrollmentProfileByID.go
│ ├── UpdateMobileDeviceEnrollmentProfileByInvitation
│ │ └── UpdateMobileDeviceEnrollmentProfileByInvitation.go
│ └── UpdateMobileDeviceEnrollmentProfileByName
│ │ └── UpdateMobileDeviceEnrollmentProfileByName.go
├── mobile_device_prestages
│ ├── CreateMobileDevicePrestage
│ │ └── CreateMobileDevicePrestage.go
│ ├── DeleteMobileDevicePrestageByID
│ │ └── DeleteMobileDevicePrestageByID.go
│ ├── DeleteMobileDevicePrestageByName
│ │ └── DeleteMobileDevicePrestageByName.go
│ ├── GetDeviceScopeForMobileDevicePrestage
│ │ └── GetDeviceScopeForMobileDevicePrestage.go
│ ├── GetMobileDevicePrestageByID
│ │ └── GetMobileDevicePrestageByID.go
│ ├── GetMobileDevicePrestageByName
│ │ └── GetMobileDevicePrestageByName.go
│ ├── GetMobileDevicePrestages
│ │ └── GetMobileDevicePrestages.go
│ ├── UpdateMobileDevicePrestageByID
│ │ └── UpdateMobileDevicePrestageByID.go
│ └── UpdateMobileDevicePrestageByName
│ │ └── UpdateMobileDevicePrestageByName.go
├── mobile_device_provisioning_profiles
│ ├── CreateMobileDeviceProvisioningProfileByID
│ │ └── CreateMobileDeviceProvisioningProfileByID.go
│ ├── CreateMobileDeviceProvisioningProfileByName
│ │ └── CreateMobileDeviceProvisioningProfileByName.go
│ ├── CreateMobileDeviceProvisioningProfileByUUID
│ │ └── CreateMobileDeviceProvisioningProfileByUUID.go
│ ├── DeleteMobileDeviceProvisioningProfileByID
│ │ └── DeleteMobileDeviceProvisioningProfileByID.go
│ ├── DeleteMobileDeviceProvisioningProfileByName
│ │ └── DeleteMobileDeviceProvisioningProfileByName.go
│ ├── DeleteMobileDeviceProvisioningProfileByUUID
│ │ └── DeleteMobileDeviceProvisioningProfileByUUID.go
│ ├── GetMobileDeviceProvisioningProfileByID
│ │ └── GetMobileDeviceProvisioningProfileByID.go
│ ├── GetMobileDeviceProvisioningProfileByName
│ │ └── GetMobileDeviceProvisioningProfileByName.go
│ ├── GetMobileDeviceProvisioningProfileByUUID
│ │ └── GetMobileDeviceProvisioningProfileByUUID.go
│ ├── GetMobileDeviceProvisioningProfiles
│ │ └── GetMobileDeviceProvisioningProfiles.go
│ ├── UpdateMobileDeviceProvisioningProfileByID
│ │ └── UpdateMobileDeviceProvisioningProfileByID.go
│ ├── UpdateMobileDeviceProvisioningProfileByName
│ │ └── UpdateMobileDeviceProvisioningProfileByName.go
│ └── UpdateMobileDeviceProvisioningProfileByUUID
│ │ └── UpdateMobileDeviceProvisioningProfileByUUID.go
├── mobile_devices
│ ├── CreateMobileDevice
│ │ └── CreateMobileDevice.go
│ ├── DeleteMobileDeviceByID
│ │ └── DeleteMobileDeviceByID.go
│ ├── DeleteMobileDeviceByName
│ │ └── DeleteMobileDeviceByName.go
│ ├── GetMobileDeviceByIDAndDataSubset
│ │ └── GetMobileDeviceByIDAndDataSubset.go
│ ├── GetMobileDeviceByName
│ │ └── GetMobileDeviceByName.go
│ ├── GetMobileDeviceByNameAndDataSubset
│ │ └── GetMobileDeviceByNameAndDataSubset.go
│ ├── GetMobileDevices
│ │ └── GetMobileDevices.go
│ ├── GetMobileDevicesByID
│ │ └── GetMobileDevicesByID.go
│ ├── UpdateMobileDeviceByID
│ │ └── UpdateMobileDeviceByID.go
│ └── UpdateMobileDeviceByName
│ │ └── UpdateMobileDeviceByName.go
├── mobile_extension_attributes
│ ├── CreateMobileExtensionAttribute
│ │ └── CreateMobileExtensionAttribute.go
│ ├── DeleteMobileExtensionAttributeByID
│ │ └── DeleteMobileExtensionAttributeByID.go
│ ├── DeleteMobileExtensionAttributeByName
│ │ └── DeleteMobileExtensionAttributeByName.go
│ ├── GetMobileExtensionAttributeByID
│ │ └── GetMobileExtensionAttributeByID.go
│ ├── GetMobileExtensionAttributeByName
│ │ └── GetMobileExtensionAttributeByName.go
│ ├── GetMobileExtensionAttributes
│ │ └── GetMobileExtensionAttributes.go
│ ├── UpdateMobileExtensionAttributeByID
│ │ └── UpdateMobileExtensionAttributeByID.go
│ └── UpdateMobileExtensionAttributeByName
│ │ └── UpdateMobileExtensionAttributeByName.go
├── network_segments
│ ├── CreateNetworkSegment
│ │ └── CreateNetworkSegment.go
│ ├── DeleteNetworkSegmentByID
│ │ └── DeleteNetworkSegmentByID.go
│ ├── DeleteNetworkSegmentByName
│ │ └── DeleteNetworkSegmentByName.go
│ ├── GetNetworkSegmentByID
│ │ └── GetNetworkSegmentByID.go
│ ├── GetNetworkSegmentByName
│ │ └── GetNetworkSegmentByName.go
│ ├── GetNetworkSegments
│ │ └── GetNetworkSegments.go
│ ├── UpdateNetworkSegmentByID
│ │ └── UpdateNetworkSegmentByID.go
│ └── UpdateNetworkSegmentByName
│ │ └── UpdateNetworkSegmentByName.go
├── notifications
│ └── GetNotificationsForUserAndSite
│ │ └── GetNotificationsForUserAndSite.go
├── oidc
│ ├── GenerateKeystoreForOIDCMessages
│ │ └── GenerateKeystoreForOIDCMessages.go
│ ├── GetPublicKeyOfOIDCKeystore
│ │ └── GetPublicKeyOfOIDCKeystore.go
│ └── SetRedirectURLForOIDCLogon
│ │ └── SetRedirectURLForOIDCLogon.go
├── packages
│ ├── CreatePackage
│ │ └── CreatePackage.go
│ ├── DeleteMultiplePackagesByID
│ │ └── DeleteMultiplePackagesByID.go
│ ├── DeletePackageManifestByID
│ │ └── DeletePackageManifestByID.go
│ ├── DeletePackagesByID
│ │ └── DeletePackageByID.go
│ ├── GetPackageByID
│ │ └── GetPackageByID.go
│ ├── GetPackageByName
│ │ └── GetPackageByName.go
│ ├── GetPackageHistoryByPackageID
│ │ └── GetPackageHistoryByPackageID.go
│ ├── GetPackages
│ │ └── GetPackages.go
│ ├── UpdatePackageManifestByID
│ │ └── UpdatePackageByID.go
│ └── UploadPackage
│ │ └── UploadPackage.go
├── patch_management
│ └── AcceptPatchManagementDisclaimer
│ │ └── AcceptPatchManagementDisclaimer.go
├── patch_management_external_sources
│ ├── CreateExternalPatchSource
│ │ └── CreateExternalPatchSource.go
│ ├── DeleteExternalPatchSourceByID
│ │ └── DeleteExternalPatchSourceByID.go
│ ├── GetPatchExternalSourceByID
│ │ └── GetPatchExternalSourceByID.go
│ ├── GetPatchExternalSourceByName
│ │ └── GetPatchExternalSourceByName.go
│ ├── GetPatchExternalSources
│ │ └── GetPatchExternalSources.go
│ └── UpdateExternalPatchSourceByID
│ │ └── UpdateExternalPatchSourceByID.go
├── patch_policies
│ ├── AddPatchPolicyToDashboard
│ │ └── AddPatchPolicyToDashboard.go
│ ├── CreatePatchPolicy
│ │ └── CreatePatchPolicy.go
│ ├── DeletePatchPolicyByID
│ │ └── DeletePatchPolicyByID.go
│ ├── DeletePatchPolicyFromDashboard
│ │ └── DeletePatchPolicyFromDashboard.go
│ ├── GetPatchPolicies
│ │ └── GetPatchPolicies.go
│ ├── GetPatchPolicyByID
│ │ └── GetPatchPolicyByID.go
│ ├── GetPatchPolicyByName
│ │ └── GetPatchPolicyByName.go
│ ├── GetPatchPolicyDashboardStatus
│ │ └── GetPatchPolicyDashboardStatus.go
│ └── UpdatePatchPolicyByID
│ │ └── UpdatePatchPolicyByID.go
├── patch_software_title_configurations
│ ├── CreatePatchSoftwareTitleConfiguration
│ │ └── CreatePatchSoftwareTitleConfiguration.go
│ ├── DeletePatchSoftwareTitleConfigurationById
│ │ └── DeletePatchSoftwareTitleConfigurationById.go
│ ├── GetPatchSoftwareTitleConfigurationById
│ │ └── GetPatchSoftwareTitleConfigurationById.go
│ ├── GetPatchSoftwareTitleConfigurationByName
│ │ └── GetPatchSoftwareTitleConfigurationByName.go
│ ├── GetPatchSoftwareTitleConfigurations
│ │ └── GetPatchSoftwareTitleConfigurations.go
│ ├── GetPatchSoftwareTitleDefinitions
│ │ └── GetPatchSoftwareTitleDefinitions.go
│ ├── GetPatchSoftwareTitleDependencies
│ │ └── GetPatchSoftwareTitleDependencies.go
│ ├── GetPatchSoftwareTitleExtensionAttributes
│ │ └── GetPatchSoftwareTitleExtensionAttributes.go
│ ├── GetSoftwareTitleConfigurations
│ │ └── GetSoftwareTitleConfigurations.go
│ └── UpdatePatchSoftwareTitleConfigurationById
│ │ └── UpdatePatchSoftwareTitleConfigurationById.go
├── policies
│ ├── CreateDeleteAccountPolicy
│ │ └── CreateDeleteAccountPolicy.go
│ ├── CreateDirectoryBindingPolicy
│ │ └── CreateDirectoryBindingPolicy.go
│ ├── CreateDisableUserForFilevault2Policy
│ │ └── CreateDisableUserForFilevault2Policy.go
│ ├── CreateDiskEncryptionWithIndividualKeyPolicy
│ │ └── CreateDiskEncryptionWithIndividualKeyPolicy.go
│ ├── CreateDiskEncryptionWithInstitutionalKeyPolicy
│ │ └── CreateDiskEncryptionWithInstitutionalKeyPolicy.go
│ ├── CreateDockItemPolicy
│ │ └── CreateDockItemPolicy.go
│ ├── CreateEFIPasswordRemovePolicy
│ │ └── CreateEFIPasswordRemovePolicy.go
│ ├── CreateEFIPasswordSetPolicy
│ │ └── CreateEFIPasswordSetPolicy.go
│ ├── CreateFileAndProcessesPolicy
│ │ └── CreateFileAndProcessesPolicy.go
│ ├── CreateMaintenancePolicy
│ │ └── CreateMaintenancePolicy.go
│ ├── CreateManagementAccountPolicy
│ │ └── CreateManagementAccountPolicy.go
│ ├── CreateNewLocalAccountPolicy
│ │ └── CreateNewLocalAccountPolicy.go
│ ├── CreatePackagePolicy
│ │ └── CreatePackagePolicy.go
│ ├── CreatePolicyMinimumConfig
│ │ └── CreatePolicyMinimumConfig.go
│ ├── CreatePrinterPolicy
│ │ └── CreatePrinterPolicy.go
│ ├── CreateResetAccountPasswordPolicy
│ │ └── CreateResetAccountPasswordPolicy.go
│ ├── CreateRestartOptionsPolicy
│ │ └── CreateRestartOptionsPolicy.go
│ ├── CreateScriptPolicy
│ │ └── CreateScriptPolicy.go
│ ├── CreateSelfServicePolicy
│ │ └── CreateSelfServicePolicy.go
│ ├── CreateSoftwareUpdatePolicy
│ │ └── CreateSoftwareUpdatePolicy.go
│ ├── CreateUserInterationPolicy
│ │ └── CreateUserInterationPolicy.go
│ ├── DeletePolicyByID
│ │ └── DeletePolicyByID.go
│ ├── DeletePolicyByName
│ │ └── DeletePolicyByName.go
│ ├── GetPolicies
│ │ └── GetPolicies.go
│ ├── GetPoliciesByType
│ │ └── GetPoliciesByType.go
│ ├── GetPolicyByCategory
│ │ └── GetPolicyByCategory.go
│ ├── GetPolicyByID
│ │ └── GetPolicyByID.go
│ ├── GetPolicyByName
│ │ └── GetPolicyByName.go
│ ├── UpdatePolicyByID
│ │ └── UpdatePolicyByID.go
│ └── UpdatePolicyByName
│ │ └── UpdatePolicyByName.go
├── policy_properties
│ ├── GetPolicyProperties
│ │ └── GetPolicyProperties.go
│ └── UpdatePolicyProperties
│ │ └── UpdatePolicyProperties.go
├── printers
│ ├── CreatePrinters
│ │ └── CreatePrinters.go
│ ├── DeleteAllPrinters
│ │ └── DeleteAllPrinters.go
│ ├── DeletePrinterByID
│ │ └── DeletePrinterByID.go
│ ├── DeletePrinterByName
│ │ └── DeletePrinterByName.go
│ ├── GetPrinterByID
│ │ └── GetPrinterByID.go
│ ├── GetPrinterByName
│ │ └── GetPrinterByName.go
│ ├── GetPrinters
│ │ └── GetPrinters.go
│ ├── UpdatePrinterByID
│ │ └── UpdatePrinterByID.go
│ └── UpdatePrinterByName
│ │ └── UpdatePrinterByName.go
├── removeable_mac_addresses
│ ├── CreateRemovableMACAddress
│ │ └── CreateRemovableMACAddress.go
│ ├── DeleteRemovableMACAddressByID
│ │ └── DeleteRemovableMACAddressByID.go
│ ├── DeleteRemovableMACAddressByName
│ │ └── DeleteRemovableMACAddressByName.go
│ ├── GetRemovableMACAddressByID
│ │ └── GetRemovableMACAddressByID.go
│ ├── GetRemovableMACAddressByName
│ │ └── GetRemovableMACAddressByName.go
│ ├── GetRemovableMACAddresses
│ │ └── GetRemovableMACAddresses.go
│ ├── UpdateRemovableMACAddressByID
│ │ └── UpdateRemovableMACAddressByID.go
│ └── UpdateRemovableMACAddressByName
│ │ └── UpdateRemovableMACAddressByName.go
├── restricted_software
│ ├── CreateRestrictedSoftware
│ │ └── CreateRestrictedSoftware.go
│ ├── DeleteRestrictedSoftwareByID
│ │ └── DeleteRestrictedSoftwareByID.go
│ ├── DeleteRestrictedSoftwareByName
│ │ └── DeleteRestrictedSoftwareByName.go
│ ├── GetRestrictedSoftwareByID
│ │ └── GetRestrictedSoftwareByID.go
│ ├── GetRestrictedSoftwareByName
│ │ └── GetRestrictedSoftwareByName.go
│ ├── GetRestrictedSoftwares
│ │ └── GetRestrictedSoftwares.go
│ ├── UpdateRestrictedSoftwareByID
│ │ └── UpdateRestrictedSoftwareByID.go
│ └── UpdateRestrictedSoftwareByName
│ │ └── UpdateRestrictedSoftwareByName.go
├── return_to_service
│ ├── CreateReturnToServiceConfiguration
│ │ └── CreateReturnToServiceConfiguration.go
│ └── GetReturnToServiceConfigurations
│ │ └── GetReturnToServiceConfigurations.go
├── scripts
│ ├── CreateScript
│ │ └── CreateScript.go
│ ├── CreateScriptWithFileUpload
│ │ └── CreateScriptWithFileUpload.go
│ ├── DeleteAllScripts
│ │ └── DeleteAllScripts.go
│ ├── DeleteScriptByID
│ │ └── DeleteScriptByID.go
│ ├── DeleteScriptByName
│ │ └── DeleteScriptByName.go
│ ├── GetScripts
│ │ └── GetScripts.go
│ ├── GetScriptsByID
│ │ └── GetScriptsByID.go
│ ├── GetScriptsByName
│ │ └── GetScriptsByName.go
│ ├── UpdateScriptByID
│ │ └── UpdateScriptByID.go
│ ├── UpdateScriptByIDWithFile
│ │ └── UpdateScriptByIDWithFile.go
│ ├── UpdateScriptByName
│ │ └── UpdateScriptByName.go
│ └── UpdateScriptByNameWithFileUpload
│ │ └── UpdateScriptByNameWithFileUpload.go
├── self_service
│ └── UploadSelfServiceBrandingImage
│ │ ├── UploadSelfServiceBrandingImage.go
│ │ └── self_service.png
├── self_service_branding_macos
│ ├── CreateSelfServiceBrandingMacOS
│ │ └── CreateSelfServiceBrandingMacOS.go
│ ├── DeleteSelfServiceBrandingMacOSByID
│ │ └── DeleteSelfServiceBrandingMacOSByID.go
│ ├── DeleteSelfServiceBrandingMacOSByName
│ │ └── DeleteSelfServiceBrandingMacOSByName.go
│ ├── GetSelfServiceBrandingMacOS
│ │ └── GetSelfServiceBrandingMacOS.go
│ ├── GetSelfServiceBrandingMacOSByID
│ │ └── GetSelfServiceBrandingMacOSByID.go
│ ├── UpdateSelfServiceBrandingMacOSByID
│ │ └── UpdateSelfServiceBrandingMacOSByID.go
│ └── UpdateSelfServiceBrandingMacOSByName
│ │ └── UpdateSelfServiceBrandingMacOSByName.go
├── self_service_settings
│ ├── GetSelfServiceSettings
│ │ └── GetSelfServiceSettings.go
│ └── UpdateSelfServiceSettings
│ │ └── UpdateSelfServiceSettings.go
├── sites
│ ├── CreateSite
│ │ └── CreateSite.go
│ ├── DeleteAllSites
│ │ └── DeleteAllSites.go
│ ├── DeleteSiteByID
│ │ └── DeleteSiteByID.go
│ ├── DeleteSiteByName
│ │ └── DeleteSiteByName.go
│ ├── GetSiteByID
│ │ └── GetSiteByID.go
│ ├── GetSiteByName
│ │ └── GetSiteByName.go
│ ├── GetSites
│ │ └── GetSites.go
│ ├── UpdateSiteByID
│ │ └── UpdateSiteByID.go
│ └── UpdateSiteByName
│ │ └── UpdateSiteByName.go
├── smart_computer_groups
│ ├── CreateSmartComputerGroup
│ │ └── CreateSmartComputerGroup.go
│ ├── DeleteComputerGroupByID
│ │ └── DeleteComputerGroupByID.go
│ ├── GetComputerGroupByID
│ │ └── GetComputerGroupByID.go
│ ├── GetSmartComputerGroupByName
│ │ └── GetSmartComputerGroupByName.go
│ ├── GetSmartComputerGroupMembershipByID
│ │ └── GetSmartComputerGroupMembershipByID.go
│ ├── GetSmartComputerGroups
│ │ └── GetSmartComputerGroups.go
│ ├── GetSmartComputerGroupsV2
│ │ └── GetSmartComputerGroupsV2.go
│ └── UpdateSmartComputerGroupByID
│ │ └── UpdateSmartComputerGroupByID.go
├── smtp_server
│ ├── GetSMTPServerInformation
│ │ └── GetSMTPServerInformation.go
│ ├── UpdateSMTPServerInformationBasicAuth
│ │ └── UpdateSMTPServerInformationBasicAuth.go
│ ├── UpdateSMTPServerInformationGoogleAuth
│ │ └── UpdateSMTPServerInformationGoogleAuth.go
│ └── UpdateSMTPServerInformationGraphAPIAuth
│ │ └── UpdateSMTPServerInformationGraphAPIAuth.go
├── software_update_servers
│ ├── CreateSoftwareUpdateServer
│ │ └── CreateSoftwareUpdateServer.go
│ ├── DeleteSoftwareUpdateServerByID
│ │ └── DeleteSoftwareUpdateServerByID.go
│ ├── DeleteSoftwareUpdateServerByName
│ │ └── DeleteSoftwareUpdateServerByName.go
│ ├── GetSoftwareUpdateServers
│ │ └── GetSoftwareUpdateServers.go
│ ├── GetSoftwareUpdateServersByID
│ │ └── GetSoftwareUpdateServersByID.go
│ ├── GetSoftwareUpdateServersByName
│ │ └── GetSoftwareUpdateServersByName.go
│ ├── UpdateSoftwareUpdateServerByID
│ │ └── UpdateSoftwareUpdateServerByID.go
│ └── UpdateSoftwareUpdateServerByName
│ │ └── UpdateSoftwareUpdateServerByName.go
├── sso_certificate
│ ├── CreateSSOCertificate
│ │ └── CreateSSOCertificate.go
│ ├── DeleteSSOCertificate
│ │ └── DeleteSSOCertificate.go
│ └── GetSSOCertificate
│ │ └── GetSSOCertificate.go
├── sso_failover
│ ├── GetSSOFailoverURL
│ │ └── GetSSOFailoverURL.go
│ └── UpdateSSOFailoverURL
│ │ └── UpdateSSOFailoverURL.go
├── sso_settings
│ ├── GetSsoEnrollmentCustomizationDependencies
│ │ └── GetSsoEnrollmentCustomizationDependencies.go
│ ├── GetSsoSettings
│ │ └── GetSsoSettings.go
│ └── UpdateSsoSettings
│ │ └── UpdateSsoSettings.go
├── startup_status
│ └── GetStartupStatus
│ │ └── GetStartupStatus.go
├── static_computer_groups
│ ├── CreateStaticComputerGroup
│ │ └── CreateStaticComputerGroup.go
│ ├── UpdateStaticComputerGroupByID
│ │ └── UpdateStaticComputerGroupByID.go
│ └── UpdateStaticComputerGroupByName
│ │ └── UpdateStaticComputerGroupByName.go
├── support_files
│ ├── accessibility-chara-nosub-test.mobileconfig
│ ├── accessibility-chara-sub-test.mobileconfig
│ ├── computer_extensioin_attribute.sh
│ ├── configprofile_export
│ │ └── Test from iMazing JL Friday 19.mobileconfig
│ ├── ebooks_pdf
│ │ └── Apple-Developer-Program-License-Agreement-20230828-English.pdf
│ ├── filevaultcertificate
│ │ └── FileVaultMaster-sdk.p12
│ ├── printer_ppd
│ │ └── cnadv400x1g.ppd
│ ├── scriptfile.sh
│ └── sec-baseline-test.mobileconfig
├── time_zones
│ └── GetTimeZones
│ │ └── GetTimeZones.go
├── user_extension_attributes
│ ├── CreateUserExtensionAttribute
│ │ └── CreateUserExtensionAttribute.go
│ ├── DeleteUserExtensionAttributeByID
│ │ └── DeleteUserExtensionAttributeByID.go
│ ├── DeleteUserExtensionAttributeByName
│ │ └── DeleteUserExtensionAttributeByName.go
│ ├── GetUserExtensionAttributeByID
│ │ └── GetUserExtensionAttributeByID.go
│ ├── GetUserExtensionAttributeByName
│ │ └── GetUserExtensionAttributeByName.go
│ ├── GetUserExtensionAttributes
│ │ └── GetUserExtensionAttributes.go
│ ├── UpdateUserExtensionAttributeByID
│ │ └── UpdateUserExtensionAttributeByID.go
│ └── UpdateUserExtensionAttributeByName
│ │ └── UpdateUserExtensionAttributeByName.go
├── user_groups
│ ├── CreateUserGroupSmart
│ │ └── CreateUserGroupSmart.go
│ ├── CreateUserGroupStatic
│ │ └── CreateUserGroupStatic.go
│ ├── DeleteAllUserGroups
│ │ └── DeleteAllUserGroups.go
│ ├── DeleteUserGroupByID
│ │ └── DeleteUserGroupByID.go
│ ├── DeleteUserGroupByName
│ │ └── DeleteUserGroupByName.go
│ ├── GetUserGroups
│ │ └── GetUserGroups.go
│ ├── GetUserGroupsByID
│ │ └── GetUserGroupsByID.go
│ ├── GetUserGroupsByName
│ │ └── GetUserGroupsByName.go
│ ├── UpdateUserGroupByIDSmart
│ │ └── UpdateUserGroupByIDSmart.go
│ ├── UpdateUserGroupByIDStatic
│ │ └── UpdateUserGroupByIDStatic.go
│ ├── UpdateUserGroupByIDStaticAdditions
│ │ └── UpdateUserGroupByIDStaticAdditions.go
│ ├── UpdateUserGroupByIDStaticDeletions
│ │ └── UpdateUserGroupByIDStaticDeletions.go
│ ├── UpdateUserGroupByNameSmart
│ │ └── UpdateUserGroupByNameSmart.go
│ ├── UpdateUserGroupByNameStatic
│ │ └── UpdateUserGroupByNameStatic.go
│ ├── UpdateUserGroupByNameStaticAdditions
│ │ └── UpdateUserGroupByNameStaticAdditions.go
│ └── UpdateUserGroupByNameStaticDeletions
│ │ └── UpdateUserGroupByNameStaticDeletions.go
├── users
│ ├── CreateUser
│ │ └── CreateUser.go
│ ├── DeleteUserByEmail
│ │ └── DeleteUserByEmail.go
│ ├── DeleteUserByID
│ │ └── DeleteUserByID.go
│ ├── DeleteUserByName
│ │ └── DeleteUserByName.go
│ ├── GetUserByEmail
│ │ └── GetUserByEmail.go
│ ├── GetUserByID
│ │ └── GetUserByID.go
│ ├── GetUserByName
│ │ └── GetUserByName.go
│ ├── GetUsers
│ │ └── GetUsers.go
│ ├── UpdateUserByEmail
│ │ └── UpdateUserByEmail.go
│ ├── UpdateUserByID
│ │ └── UpdateUserByID.go
│ └── UpdateUserByName
│ │ └── UpdateUserByName.go
├── volume_purchasing_locations
│ ├── CreateVolumePurchasingLocation
│ │ └── CreateVolumePurchasingLocation.go
│ ├── DeleteVolumePurchasingLocationByID
│ │ └── DeleteVolumePurchasingLocationByID.go
│ ├── GetVolumePurchaseLocations
│ │ └── GetVolumePurchaseLocations.go
│ ├── GetVolumePurchasingLocationByID
│ │ └── GetVolumePurchasingLocationByID.go
│ └── UpdateVolumePurchasingLocationByID
│ │ └── UpdateVolumePurchasingLocationByID.go
├── volume_purchasing_subscriptions
│ ├── CreateVolumePurchasingSubscription
│ │ └── CreateVolumePurchasingSubscription.go
│ ├── DeleteVolumePurchasingSubscriptionByID
│ │ └── DeleteVolumePurchasingSubscriptionByID.go
│ ├── DeleteVolumePurchasingSubscriptionByName
│ │ └── DeleteVolumePurchasingSubscriptionByName.go
│ ├── GetVolumePurchasingSubscriptionByID
│ │ └── GetVolumePurchasingSubscriptionByID.go
│ ├── GetVolumePurchasingSubscriptionByName
│ │ └── GetVolumePurchasingSubscriptionByName.go
│ ├── GetVolumePurchasingSubscriptions
│ │ └── GetVolumePurchasingSubscriptions.go
│ ├── UpdateVolumePurchasingSubscriptionByID
│ │ └── UpdateVolumePurchasingSubscriptionByID.go
│ └── UpdateVolumePurchasingSubscriptionByName
│ │ └── UpdateVolumePurchasingSubscriptionByName.go
├── vpp_accounts
│ ├── CreateVPPAccount
│ │ └── CreateVPPAccount.go
│ ├── DeleteVPPAccountByID
│ │ └── DeleteVPPAccountByID.go
│ ├── GetVPPAccountByID
│ │ └── GetVPPAccountByID.go
│ ├── GetVPPAccounts
│ │ └── GetVPPAccounts.go
│ └── UpdateVPPAccount
│ │ └── UpdateVPPAccount.go
├── vpp_assignments
│ ├── CreateVPPAssignment
│ │ └── CreateVPPAssignment.go
│ ├── DeleteVPPAssignmentByID
│ │ └── DeleteVPPAssignmentByID.go
│ ├── GetVPPAssignmentByID
│ │ └── GetVPPAssignmentByID.go
│ ├── GetVPPAssignments
│ │ └── GetVPPAssignments.go
│ └── UpdateVPPAssignmentByID
│ │ └── UpdateVPPAssignmentByID.go
└── webhooks
│ ├── CreateWebhook
│ └── CreateWebhook.go
│ ├── DeleteWebhookByID
│ └── DeleteWebhookByID.go
│ ├── DeleteWebhookByName
│ └── DeleteWebhookByName.go
│ ├── GetWebhookByID
│ └── GetWebhookByID.go
│ ├── GetWebhookByName
│ └── GetWebhookByName.go
│ ├── GetWebhooks
│ └── GetWebhooks.go
│ ├── UpdateWebhookByID
│ └── UpdateWebhookByID.go
│ └── UpdateWebhookByName
│ └── UpdateWebhookByName.go
├── go.mod
├── go.sum
├── modules
├── helpers.go
├── import.go
├── jamf_binary.go
├── macos.go
└── readme.md
├── recipes
├── api_roles
│ └── SetAllAvailableApiPriviledgesTorole
│ │ └── SetAllAvailableApiPriviledgesToRole.go
├── computer_extension_attributes
│ ├── DeleteAllComputerExtensionAttributes
│ │ └── DeleteAllComputerExtensionAttributes.go
│ └── ExportComputerExtensionAttributes
│ │ └── ExportComputerExtensionAttributes.go
├── computer_history
│ ├── GetAllComputerHistories
│ │ └── GetAllComputerHistories.go
│ └── GetAllComputersWithFailedCommands
│ │ └── GetAllComputersWithFailedCommands.go
├── computer_inventory
│ ├── CertificateExpirationCheck
│ │ └── CertificateExpirationCheck.go
│ ├── FindAllUsersWithMoreThanOneMacAndExportToCSV
│ │ └── FindAllUsersWithMoreThanOneMacAndExportToCSV.go
│ └── SetDeviceStateToUnmanaged
│ │ └── SetDeviceStateToUnmanaged.go
├── jamf_pro_initialization_server
│ └── InitializeAndcheckStatus.go
├── jamf_service_status_check
│ └── detect_jamf_pro_downtime
│ │ ├── jamf_outages.log
│ │ └── jamf_service_status_check.go
├── local_administrator_password
│ ├── GetLocalAdminPasswordCapableAccountsByComputerName
│ │ └── GetLocalAdminPasswordCapableAccountsByComputerName.go
│ └── SetLocalAdminPasswordForAllCapableAccountsByComputerName
│ │ └── SetLocalAdminPasswordForAllCapableAccountsByComputerName.go
├── macos_configuration_profiles
│ ├── CreateMacOSConfigurationProfileWithFileUpload
│ │ └── CreateMacOSConfigurationProfileWithFileUpload.go
│ ├── CreateMacOSConfigurationProfileWithFullScope
│ │ └── CreateMacOSConfigurationProfileWithFullScope.go
│ ├── DeleteAllMacOSConfigurationProfiles
│ │ └── DeleteAllMacOSConfigurationProfiles.go
│ ├── ExportAllMacOSConfigurationProfilesToFiles
│ │ └── ExportAllMacOSConfigurationProfilesToFiles.go
│ └── ExportMacOSConfigurationProfileToFile
│ │ └── ExportMacOSConfigurationProfileToFile.go
├── mdm
│ ├── ClearFailedMDMCommands
│ │ └── ClearFailedMDMCommands.go
│ └── SetOrRemoveRecoveryLockForAppleSiliconMacs
│ │ └── SetOrRemoveRecoveryLockForAppleSiliconMacs.go
├── mobile_device_configuration_profiles
│ ├── CreateMobileDeviceConfigurationProfileWithFileUpload
│ │ └── CreateMacOSConfigurationProfileWithFileUpload.go
│ └── ExportAllMobileDeviceConfigurationProfilesToFiles
│ │ └── ExportAllMobileDeviceConfigurationProfilesToFiles.go
├── packages
│ └── package_uploader
│ │ ├── dependancies
│ │ └── dependancies.go
│ │ ├── internal
│ │ ├── ascii.go
│ │ └── helpers.go
│ │ └── main.go
├── patch_management
│ └── UploadPackageAndAssignToPatchPolicy
│ │ └── UploadPackageAndAssignToPatchPolicy.go
├── policies
│ ├── CreateScriptPolicyFull
│ │ └── CreateScriptPolicyFull.go
│ └── DeleteAllPolicies
│ │ └── DeleteAllPolicies.go
├── privileges
│ ├── Export_All_Assigned_Privileges_By_Api_Integration
│ │ └── Export_All_Assigned_Privileges_By_Api_Integration.go
│ └── Export_All_Available_Privileges_By_Type_To_Json
│ │ └── Export_All_Available_Privileges_By_Type_To_Json.go
├── restricted_software
│ └── DeleteAllRestrictedSoftware
│ │ └── DeleteAllRestrictedSoftware.go
├── scripts
│ └── DeleteAllScripts
│ │ └── DeleteAllScripts.go
└── static_computer_groups
│ └── AddOrRemoveStaticComputerGroupMembershipFromFileList
│ └── AddOrRemoveStaticComputerGroupMembershipFromFileList.go
├── scripts
└── p12-cert-gen.sh
├── sdk
├── helpers
│ ├── iso_369_codes.go
│ └── read_file.go
├── integration_tests
│ ├── classicapi_computers_test_data.xml
│ ├── classicapi_departments_test.go.TODO
│ ├── classicapi_departments_test_data.xml
│ ├── classicapi_scripts_test_data.xml
│ ├── common_test_harness_data.json
│ ├── common_test_harness_test.go.TODO
│ ├── jamfproapi_sso_failover_test.go
│ └── main_test.go.TODO
└── jamfpro
│ ├── api_client_builders.go
│ ├── classicapi_accounts.go
│ ├── classicapi_accounts_groups.go
│ ├── classicapi_activation_code.go
│ ├── classicapi_advanced_computer_searches.go
│ ├── classicapi_advanced_user_searches.go
│ ├── classicapi_allowed_file_extensions.go
│ ├── classicapi_byoprofiles.go
│ ├── classicapi_classes.go
│ ├── classicapi_command_flush.go
│ ├── classicapi_computer_groups.go
│ ├── classicapi_computer_history.go
│ ├── classicapi_computer_inventory_collection.go
│ ├── classicapi_computer_invitations.go
│ ├── classicapi_computers.go
│ ├── classicapi_directory_bindings.go
│ ├── classicapi_disk_encryption_configurations.go
│ ├── classicapi_dock_items.go
│ ├── classicapi_ebooks.go
│ ├── classicapi_file_share_distribution_points.go
│ ├── classicapi_file_uploads.go
│ ├── classicapi_ibeacons.go
│ ├── classicapi_ldap_servers.go
│ ├── classicapi_licensed_software.go
│ ├── classicapi_mac_applications.go
│ ├── classicapi_macos_configuration_profiles.go
│ ├── classicapi_mobile_device_applications.go
│ ├── classicapi_mobile_device_configuration_profiles.go
│ ├── classicapi_mobile_device_enrollment_profiles.go
│ ├── classicapi_mobile_device_extension_attributes.go
│ ├── classicapi_mobile_device_groups.go
│ ├── classicapi_mobile_device_provisioning_profiles.go
│ ├── classicapi_mobile_devices.go
│ ├── classicapi_network_segments.go
│ ├── classicapi_patch_external_sources.go
│ ├── classicapi_policies.go
│ ├── classicapi_printers.go
│ ├── classicapi_removeable_mac_addresses.go
│ ├── classicapi_restricted_software.go
│ ├── classicapi_sites.go
│ ├── classicapi_software_update_servers.go
│ ├── classicapi_user_extension_attributes.go
│ ├── classicapi_usergroups.go
│ ├── classicapi_users.go
│ ├── classicapi_vpp_accounts.go
│ ├── classicapi_vpp_assignments.go
│ ├── classicapi_webhooks.go
│ ├── jamfproapi_account_preferences.go
│ ├── jamfproapi_advanced_mobile_device_searches.go
│ ├── jamfproapi_api_integrations.go
│ ├── jamfproapi_api_role_privileges.go
│ ├── jamfproapi_api_roles.go
│ ├── jamfproapi_app_installers.go
│ ├── jamfproapi_bookmarks.go
│ ├── jamfproapi_buildings.go
│ ├── jamfproapi_cache_settings.go
│ ├── jamfproapi_categories.go
│ ├── jamfproapi_certificate_authority.go
│ ├── jamfproapi_client_checkin.go
│ ├── jamfproapi_cloud_azure.go
│ ├── jamfproapi_cloud_distribution_point.go
│ ├── jamfproapi_cloud_idp.go
│ ├── jamfproapi_cloud_ldap.go
│ ├── jamfproapi_cloud_ldap_keystore.go
│ ├── jamfproapi_computer_extension_attributes.go
│ ├── jamfproapi_computer_inventory.go
│ ├── jamfproapi_computer_inventory_collection_settings.go
│ ├── jamfproapi_computer_prestages.go
│ ├── jamfproapi_conditional_access.go
│ ├── jamfproapi_csa.go
│ ├── jamfproapi_declarative_device_management.go
│ ├── jamfproapi_departments.go
│ ├── jamfproapi_device_communication_settings.go
│ ├── jamfproapi_device_enrollments.go
│ ├── jamfproapi_dock_items.go
│ ├── jamfproapi_dss_declarations.go
│ ├── jamfproapi_engage.go
│ ├── jamfproapi_enrollment.go
│ ├── jamfproapi_enrollment_customizations.go
│ ├── jamfproapi_enrollment_settings.go
│ ├── jamfproapi_gsx_connection.go
│ ├── jamfproapi_health_check.go
│ ├── jamfproapi_icon.go
│ ├── jamfproapi_jamf_connect.go
│ ├── jamfproapi_jamf_content_distribution_server.go
│ ├── jamfproapi_jamf_pro_information.go
│ ├── jamfproapi_jamf_pro_notifications.go
│ ├── jamfproapi_jamf_pro_server_url.go
│ ├── jamfproapi_jamf_pro_system_initialization.go
│ ├── jamfproapi_jamf_pro_version.go
│ ├── jamfproapi_jamf_protect.go
│ ├── jamfproapi_jamf_sso_failover.go
│ ├── jamfproapi_local_admin_password.go
│ ├── jamfproapi_locales.go
│ ├── jamfproapi_log_flushing.go
│ ├── jamfproapi_login_customization.go
│ ├── jamfproapi_macos_configuration_profile_custom_settings.go
│ ├── jamfproapi_managed_software_updates.go
│ ├── jamfproapi_mdm.go
│ ├── jamfproapi_mobile_device_groups.go
│ ├── jamfproapi_mobile_device_prestages.go
│ ├── jamfproapi_oidc.go
│ ├── jamfproapi_onboarding.go
│ ├── jamfproapi_packages.go
│ ├── jamfproapi_patch_management.go
│ ├── jamfproapi_patch_policies.go
│ ├── jamfproapi_patch_software_title_configurations.go
│ ├── jamfproapi_policy_properties.go
│ ├── jamfproapi_return_to_service.go
│ ├── jamfproapi_scripts.go
│ ├── jamfproapi_self_service_branding_macos.go
│ ├── jamfproapi_self_service_branding_upload.go
│ ├── jamfproapi_self_service_settings.go
│ ├── jamfproapi_slasa.go
│ ├── jamfproapi_smart_computer_groups.go
│ ├── jamfproapi_smtp_server.go
│ ├── jamfproapi_sso_certificate.go
│ ├── jamfproapi_sso_settings.go
│ ├── jamfproapi_startup_status.go
│ ├── jamfproapi_time_zones.go
│ ├── jamfproapi_venafi.go
│ ├── jamfproapi_volume_purchasing_locations.go
│ ├── jamfproapi_volume_purchasing_subscriptions.go
│ ├── shared_error_messages.go
│ ├── shared_helpers.go
│ ├── shared_helpers_test.go
│ ├── shared_models.go
│ ├── shared_progress_reader.go
│ ├── testing_readme.md
│ ├── util_package_uploader.go
│ └── util_pagination.go
└── tools
├── plist
└── RemoveEscapedCharacters
│ └── RemoveEscapedCharacters.go
└── utils
└── configuration_profiles.go
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # See for instructions on this file
2 |
3 | # These owners will be the default owners for everything in
4 | # the repo. Unless a later match takes precedence,
5 | # @global-owner1 and @global-owner2 will be requested for
6 | # review when someone opens a pull request.
7 |
8 | * @ShocOne
9 |
10 | .azuredevops/** @ShocOne
11 | .github/** @ShocOne
12 | .pipelines/** @ShocOne
13 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # See GitHub's documentation for more information on this file:
2 | # https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates
3 | version: 2
4 | updates:
5 | # Maintain dependencies for GitHub Actions
6 | - package-ecosystem: "github-actions"
7 | directory: "/"
8 | schedule:
9 | # Check for updates to GitHub Actions every week
10 | interval: "weekly"
11 |
12 | # Maintain dependencies for Go modules
13 | - package-ecosystem: "gomod"
14 | directory: "/"
15 | schedule:
16 | # Check for updates to Go modules every week
17 | interval: "daily"
--------------------------------------------------------------------------------
/.github/workflows/gosec-scan.yml:
--------------------------------------------------------------------------------
1 | name: "Security Scan"
2 |
3 | # Run workflow each time code is pushed to your repository and on a schedule.
4 | # The scheduled workflow runs every at 00:00 on Sunday UTC time.
5 | on:
6 | push:
7 | branches: [ "main" ]
8 | pull_request:
9 | branches: [ "main" ]
10 | schedule:
11 | - cron: '0 0 * * 0'
12 |
13 | jobs:
14 | tests:
15 | runs-on: ubuntu-latest
16 | env:
17 | GO111MODULE: on
18 | steps:
19 | - name: Checkout Source
20 | uses: actions/checkout@v4
21 | - name: Run Gosec Security Scanner
22 | uses: securego/gosec@master
23 | with:
24 | # we let the report trigger content trigger a failure using the GitHub Security features.
25 | args: '-no-fail -fmt sarif -out results.sarif ./...'
26 | - name: Upload SARIF file
27 | uses: github/codeql-action/upload-sarif@v3
28 | with:
29 | # Path to SARIF file relative to the root of the repository
30 | sarif_file: results.sarif
--------------------------------------------------------------------------------
/.github/workflows/linter.yml:
--------------------------------------------------------------------------------
1 | name: Linter
2 |
3 | on: [pull_request]
4 |
5 | jobs:
6 | build:
7 | name: Linter
8 | runs-on: ubuntu-latest
9 | steps:
10 | - name: Checkout Code
11 | uses: actions/checkout@v4
12 |
13 | - name: Lint Code Base
14 | uses: github/super-linter@v7
15 | env:
16 | VALIDATE_ALL_CODEBASE: false
17 | VALIDATE_MARKDOWN: false
18 | DEFAULT_BRANCH: main
19 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
--------------------------------------------------------------------------------
/.github/workflows/release-please.yml:
--------------------------------------------------------------------------------
1 | on:
2 | push:
3 | branches:
4 | - main
5 |
6 | permissions:
7 | contents: write
8 | pull-requests: write
9 |
10 | name: release-please
11 |
12 | jobs:
13 | release-please:
14 | name: '🔖 Release Please'
15 | runs-on: ubuntu-latest
16 | steps:
17 | - uses: googleapis/release-please-action@v4.2.0
18 | with:
19 | release-type: go
20 | token: ${{ secrets.RELEASE_PLEASE_PAT }}
21 |
--------------------------------------------------------------------------------
/.github/workflows/test.yml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | on:
4 | workflow_call:
5 |
6 | jobs:
7 | run:
8 | name: Test
9 | runs-on: ubuntu-latest
10 | timeout-minutes: 5
11 | strategy:
12 | fail-fast: true
13 | matrix:
14 | go: ['stable', 'oldstable']
15 |
16 | steps:
17 | - name: Install Go
18 | uses: actions/setup-go@v5
19 | with:
20 | go-version: ${{ matrix.go }}
21 | check-latest: true
22 |
23 | - name: Checkout code
24 | uses: actions/checkout@v4
25 |
26 | - name: Run tests
27 | run: go test -v -count=1 -race -shuffle=on -coverprofile=coverage.txt ./...
28 |
29 | - name: Upload Coverage
30 | uses: codecov/codecov-action@v5
31 | continue-on-error: true
32 | with:
33 | token: ${{secrets.CODECOV_TOKEN}}
34 | file: ./coverage.txt
35 | fail_ci_if_error: false
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # If you prefer the allow list template instead of the deny list, see community template:
2 | # https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
3 | #
4 | # Binaries for programs and plugins
5 | *.exe
6 | *.exe~
7 | *.dll
8 | *.so
9 | *.dylib
10 |
11 | # Test binary, built with `go test -c`
12 | *.test
13 |
14 | # Output of the go coverage tool, specifically when used with LiteIDE
15 | *.out
16 |
17 | # Dependency directories (remove the comment below to include it)
18 | # vendor/
19 |
20 | # Go workspace file
21 | go.work
22 |
23 | # Testing with local auth
24 | *auth.json
25 |
26 | # macOS File System
27 | .DS_Store
28 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: terraform/* build
2 |
3 | ##### Go
4 | NAME := $(notdir $(PWD))
5 | VERSION := 1.0.0
6 |
7 | build: ## go build
8 | CGO_ENABLED=0 go build -o bin/$(NAME) *.go
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | # SDK Documentation Index
2 |
3 | This contains a reference library to useful documentation when using this SDK
4 |
5 | ## Misc
6 |
7 | - [debug api calls](./debug_api_calls.md)
8 |
--------------------------------------------------------------------------------
/docs/screen_shots/debug_api_calls/001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deploymenttheory/go-api-sdk-jamfpro/ba55cb4a3121bdb0f6a1bc18f3572e547644bbef/docs/screen_shots/debug_api_calls/001.png
--------------------------------------------------------------------------------
/docs/screen_shots/debug_api_calls/002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deploymenttheory/go-api-sdk-jamfpro/ba55cb4a3121bdb0f6a1bc18f3572e547644bbef/docs/screen_shots/debug_api_calls/002.png
--------------------------------------------------------------------------------
/docs/screen_shots/debug_api_calls/003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deploymenttheory/go-api-sdk-jamfpro/ba55cb4a3121bdb0f6a1bc18f3572e547644bbef/docs/screen_shots/debug_api_calls/003.png
--------------------------------------------------------------------------------
/docs/screen_shots/debug_api_calls/004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deploymenttheory/go-api-sdk-jamfpro/ba55cb4a3121bdb0f6a1bc18f3572e547644bbef/docs/screen_shots/debug_api_calls/004.png
--------------------------------------------------------------------------------
/docs/screen_shots/debug_api_calls/005.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deploymenttheory/go-api-sdk-jamfpro/ba55cb4a3121bdb0f6a1bc18f3572e547644bbef/docs/screen_shots/debug_api_calls/005.png
--------------------------------------------------------------------------------
/docs/screen_shots/debug_api_calls/006.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deploymenttheory/go-api-sdk-jamfpro/ba55cb4a3121bdb0f6a1bc18f3572e547644bbef/docs/screen_shots/debug_api_calls/006.png
--------------------------------------------------------------------------------
/docs/screen_shots/debug_api_calls/007.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deploymenttheory/go-api-sdk-jamfpro/ba55cb4a3121bdb0f6a1bc18f3572e547644bbef/docs/screen_shots/debug_api_calls/007.png
--------------------------------------------------------------------------------
/docs/screen_shots/debug_api_calls/008.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deploymenttheory/go-api-sdk-jamfpro/ba55cb4a3121bdb0f6a1bc18f3572e547644bbef/docs/screen_shots/debug_api_calls/008.png
--------------------------------------------------------------------------------
/docs/screen_shots/debug_api_calls/009.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deploymenttheory/go-api-sdk-jamfpro/ba55cb4a3121bdb0f6a1bc18f3572e547644bbef/docs/screen_shots/debug_api_calls/009.png
--------------------------------------------------------------------------------
/docs/screen_shots/debug_api_calls/010.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deploymenttheory/go-api-sdk-jamfpro/ba55cb4a3121bdb0f6a1bc18f3572e547644bbef/docs/screen_shots/debug_api_calls/010.png
--------------------------------------------------------------------------------
/examples/_templates/authentication/example_client_setup_with_configfile.go:
--------------------------------------------------------------------------------
1 | // This example demonstrates how to initialize the Jamf Pro client using the client configuration file.
2 | package main
3 |
4 | import (
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/path/to/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // Call the GetComputers method
22 | computers, err := client.GetComputers()
23 | if err != nil {
24 | log.Fatalf("Error fetching computers: %v", err)
25 | }
26 |
27 | // Print out the fetched computers
28 | fmt.Println("Fetched Computers:")
29 | for _, computer := range computers.Results {
30 | fmt.Printf("ID: %d, Name: %s\n", computer.ID, computer.Name)
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/examples/account_groups/DeleteAccountGroupByID/DeleteAccountGroupByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Let's assume you want to delete an account group with ID 42.
21 | accountGroupID := "1"
22 |
23 | // Call DeleteAccountGroupByID function
24 | err = client.DeleteAccountGroupByID(accountGroupID)
25 | if err != nil {
26 | log.Fatalf("Error deleting account group by ID: %v", err)
27 | }
28 |
29 | // Print the success message
30 | fmt.Println("Deleted Account Group Successfully.")
31 | }
32 |
--------------------------------------------------------------------------------
/examples/account_groups/DeleteAccountGroupByName/DeleteAccountGroupByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Let's assume you want to delete an account group with the name "Administrators modified group".
21 | accountGroupName := "Administrators modified"
22 |
23 | // Call DeleteAccountGroupByName function
24 | err = client.DeleteAccountGroupByName(accountGroupName)
25 | if err != nil {
26 | log.Fatalf("Error deleting account group by name: %v", err)
27 | }
28 |
29 | // Print the success message
30 | fmt.Println("Deleted Account Group Successfully.")
31 | }
32 |
--------------------------------------------------------------------------------
/examples/accounts/DeleteAccountByID/DeleteAccountByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Let's assume you want to delete an account with ID 31.
21 | accountID := "388"
22 |
23 | // Call DeleteAccountByID function
24 | err = client.DeleteAccountByID(accountID)
25 | if err != nil {
26 | log.Fatalf("Error deleting account by ID: %v", err)
27 | }
28 |
29 | // Print the success message
30 | fmt.Println("Deleted Account Successfully.")
31 | }
32 |
--------------------------------------------------------------------------------
/examples/accounts/DeleteAccountByName/DeleteAccountByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Let's assume you want to delete an account with the name "JohnDoe".
21 | accountName := "John Smith"
22 |
23 | // Call DeleteAccountByName function
24 | err = client.DeleteAccountByName(accountName)
25 | if err != nil {
26 | log.Fatalf("Error deleting account by name: %v", err)
27 | }
28 |
29 | // Print the success message
30 | fmt.Println("Deleted Account Successfully.")
31 | }
32 |
--------------------------------------------------------------------------------
/examples/accounts/GetAccounts/GetAccounts.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/xml"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // Call GetAccounts function
22 | accountsList, err := client.GetAccounts()
23 | if err != nil {
24 | log.Fatalf("Error fetching accounts: %v", err)
25 | }
26 |
27 | // Pretty print the accounts details
28 | accountsXML, err := xml.MarshalIndent(accountsList, "", " ") // Indent with 4 spaces
29 | if err != nil {
30 | log.Fatalf("Error marshaling accounts data: %v", err)
31 | }
32 | fmt.Println("Fetched Accounts List:", string(accountsXML))
33 | }
34 |
--------------------------------------------------------------------------------
/examples/activationcode/GetActivationCode/GetActivationCode.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Get the activation code
21 | activationCode, err := client.GetActivationCode()
22 | if err != nil {
23 | fmt.Printf("Error getting activation code: %v\n", err)
24 | return
25 | }
26 |
27 | fmt.Printf("Organization Name: %s\n", activationCode.OrganizationName)
28 | fmt.Printf("Activation Code: %s\n", activationCode.Code)
29 | }
30 |
--------------------------------------------------------------------------------
/examples/activationcode/UpdateActivationCode/UpdateActivationCode.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Create the ResourceActivationCode struct
21 | activationCode := &jamfpro.ResourceActivationCode{
22 | OrganizationName: "Organization Name",
23 | Code: "UW5M-xxxx-CNAP-TCDT-xxxx-DNTV-ZAGT-xxxx",
24 | }
25 |
26 | // Update the activation code
27 | err = client.UpdateActivationCode(activationCode)
28 | if err != nil {
29 | fmt.Printf("Error updating activation code: %v\n", err)
30 | return
31 | }
32 |
33 | fmt.Println("Activation code updated successfully")
34 | }
35 |
--------------------------------------------------------------------------------
/examples/advanced_computer_searches/DeleteAdvancedComputerSearchByID/DeleteAdvancedComputerSearchByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "log"
5 |
6 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
7 | )
8 |
9 | func main() {
10 | // Define the path to the JSON configuration file
11 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
12 |
13 | // Initialize the Jamf Pro client with the HTTP client configuration
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | advancedComputerSearchID := "1" // Replace 1 with the actual advanced computer search ID
20 |
21 | // Delete the advanced computer search by ID
22 | err = client.DeleteAdvancedComputerSearchByID(advancedComputerSearchID)
23 | if err != nil {
24 | log.Fatalf("Error deleting advanced computer search by ID: %v", err)
25 | }
26 |
27 | log.Println("Advanced computer search deleted successfully.")
28 | }
29 |
--------------------------------------------------------------------------------
/examples/advanced_computer_searches/DeleteAdvancedComputerSearchByName/DeleteAdvancedComputerSearchByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "log"
5 |
6 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
7 | )
8 |
9 | func main() {
10 | // Define the path to the JSON configuration file
11 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
12 |
13 | // Initialize the Jamf Pro client with the HTTP client configuration
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | advancedComputerSearchName := "Advanced Computer Search Name" // Replace with the actual advanced computer search name
20 |
21 | // Delete the advanced computer search by name
22 | err = client.DeleteAdvancedComputerSearchByName(advancedComputerSearchName)
23 | if err != nil {
24 | log.Fatalf("Error deleting advanced computer search by name: %v", err)
25 | }
26 |
27 | log.Println("Advanced computer search deleted successfully by name.")
28 | }
29 |
--------------------------------------------------------------------------------
/examples/advanced_mobile_device_searches/DeleteAdvancedMobileDeviceSearchByID/DeleteAdvancedMobileDeviceSearchByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "log"
5 |
6 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
7 | )
8 |
9 | func main() {
10 | // Define the path to the JSON configuration file
11 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
12 |
13 | // Initialize the Jamf Pro client with the HTTP client configuration
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | SearchIDToDelete := "94"
20 |
21 | // Use the client to delete an advanced mobile device search by ID
22 | // Replace 123 with the actual ID
23 | err = client.DeleteAdvancedMobileDeviceSearchByID(SearchIDToDelete)
24 | if err != nil {
25 | log.Fatalf("Error deleting advanced mobile device search by ID: %v", err)
26 | } else {
27 | log.Printf("Successfully deleted Advanced Mobile Device Search with ID: %s\n", SearchIDToDelete)
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/examples/advanced_user_searches/DeleteAdvancedUserSearchByID/DeleteAdvancedUserSearchByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "log"
5 |
6 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
7 | )
8 |
9 | func main() {
10 | // Define the path to the JSON configuration file
11 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
12 |
13 | // Initialize the Jamf Pro client with the HTTP client configuration
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | // Delete advanced user search by ID
20 | err = client.DeleteAdvancedUserSearchByID("123") // Replace 123 with the actual ID
21 | if err != nil {
22 | log.Fatalf("Error deleting advanced user search by ID: %v", err)
23 | }
24 | log.Println("Advanced user search deleted successfully by ID.")
25 | }
26 |
--------------------------------------------------------------------------------
/examples/advanced_user_searches/DeleteAdvancedUserSearchByName/DeleteAdvancedUserSearchByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "log"
5 |
6 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
7 | )
8 |
9 | func main() {
10 | // Define the path to the JSON configuration file
11 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
12 |
13 | // Initialize the Jamf Pro client with the HTTP client configuration
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | // Delete advanced user search by Name
20 | err = client.DeleteAdvancedUserSearchByName("Search Name") // Replace "Search Name" with the actual name
21 | if err != nil {
22 | log.Fatalf("Error deleting advanced user search by name: %v", err)
23 | }
24 | log.Println("Advanced user search deleted successfully by name.")
25 | }
26 |
--------------------------------------------------------------------------------
/examples/bookmarks/DeleteBookmarkByID/DeleteBookmarkByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // ID of the bookmark to be deleted
21 | bookmarkID := "4" // Replace with the actual ID of the bookmark you want to delete
22 |
23 | err = client.DeleteBookmarkByID(bookmarkID)
24 | if err != nil {
25 | log.Fatalf("Error deleting bookmark: %v", err)
26 | }
27 |
28 | fmt.Println("bookmark deleted successfully")
29 | }
30 |
--------------------------------------------------------------------------------
/examples/buildings/DeleteBuildingByID/DeleteBuildingByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // ID of the building to be deleted
21 | buildingID := "1347" // Replace with the actual ID of the building you want to delete
22 |
23 | err = client.DeleteBuildingByID(buildingID)
24 | if err != nil {
25 | log.Fatalf("Error deleting building: %v", err)
26 | }
27 |
28 | fmt.Println("Building deleted successfully")
29 | }
30 |
--------------------------------------------------------------------------------
/examples/buildings/DeleteBuildingByNameByID/DeleteBuildingByNameByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Name of the building to be deleted
21 | buildingName := "Apple Park" // Replace with the actual name of the building you want to delete
22 |
23 | err = client.DeleteBuildingByName(buildingName)
24 | if err != nil {
25 | log.Fatalf("Error deleting building: %v", err)
26 | }
27 |
28 | fmt.Println("Building deleted successfully")
29 | }
30 |
--------------------------------------------------------------------------------
/examples/buildings/DeleteMultipleBuildingsByID/DeleteMultipleBuildingsByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // IDs of the buildings to be deleted
21 | buildingIDs := []string{"5", "6"} // Replace with the actual IDs of the buildings you want to delete
22 |
23 | err = client.DeleteMultipleBuildingsByID(buildingIDs)
24 | if err != nil {
25 | log.Fatalf("Error deleting multiple buildings: %v", err)
26 | }
27 |
28 | fmt.Println("Buildings deleted successfully")
29 | }
30 |
--------------------------------------------------------------------------------
/examples/byoprofiles/DeleteBYOProfileByID/DeleteBYOProfileByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | profileID := "8" // Use the actual ID of the profile to be deleted
21 |
22 | err = client.DeleteBYOProfileByID(profileID)
23 | if err != nil {
24 | log.Fatalf("Error deleting BYO Profile by ID: %v", err)
25 | } else {
26 | fmt.Println("BYO Profile deleted successfully by ID")
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/examples/byoprofiles/DeleteBYOProfileByName/DeleteBYOProfileByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | profileName := "Personal Device Profile" // Use the actual name of the profile to be deleted
21 |
22 | err = client.DeleteBYOProfileByName(profileName)
23 | if err != nil {
24 | log.Fatalf("Error deleting BYO Profile by name: %v", err)
25 | } else {
26 | fmt.Println("BYO Profile deleted successfully by name")
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/examples/byoprofiles/GetBYOProfiles/GetBYOProfiles.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/xml"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // Call GetBYOProfiles function
22 | profiles, err := client.GetBYOProfiles()
23 | if err != nil {
24 | log.Fatalf("Failed to get BYO Profiles: %v", err)
25 | }
26 |
27 | // Pretty print the account details
28 | byoprofileXML, err := xml.MarshalIndent(profiles, "", " ") // Indent with 4 spaces
29 | if err != nil {
30 | log.Fatalf("Error marshaling account data: %v", err)
31 | }
32 | fmt.Println("Fetched BYO Profile Details:", string(byoprofileXML))
33 | }
34 |
--------------------------------------------------------------------------------
/examples/cache_settings/GetCacheSettings/GetCacheSettings.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | cacheSettings, err := client.GetCacheSettings()
21 | if err != nil {
22 | log.Fatalf("Error fetching cache settings: %s", err)
23 | }
24 |
25 | fmt.Printf("Cache Settings: %+v\n", cacheSettings)
26 | }
27 |
--------------------------------------------------------------------------------
/examples/categories/DeleteCategoryByID/DeleteCategoryByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | categoryID := "119" // Replace with the actual category ID you want to delete
21 |
22 | err = client.DeleteCategoryByID(categoryID)
23 | if err != nil {
24 | log.Fatalf("Error deleting category: %v", err)
25 | }
26 |
27 | fmt.Println("Category deleted successfully")
28 | }
29 |
--------------------------------------------------------------------------------
/examples/categories/DeleteCategoryByNameByID/DeleteCategoryByNameByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | categoryName := "Updated Applications Category Name" // Replace with the actual category name you want to delete
21 |
22 | err = client.DeleteCategoryByName(categoryName)
23 | if err != nil {
24 | log.Fatalf("Error deleting category: %v", err)
25 | }
26 |
27 | fmt.Println("Category deleted successfully")
28 | }
29 |
--------------------------------------------------------------------------------
/examples/categories/DeleteMultipleCategoriesByID/DeleteMultipleCategoriesByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define the category IDs to delete as strings
21 | categoryIDsToDelete := []string{"3", "4"} // Replace with the actual category IDs you want to delete
22 |
23 | // Call DeleteMultipleCategoriesByID function
24 | err = client.DeleteMultipleCategoriesByID(categoryIDsToDelete)
25 | if err != nil {
26 | log.Fatalf("Error deleting multiple categories: %v", err)
27 | }
28 |
29 | fmt.Println("Categories deleted successfully")
30 | }
31 |
--------------------------------------------------------------------------------
/examples/categories/GetCategoryByID/GetCategoryByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define a category ID for testing
21 | categoryID := "1" // Replace with an actual category ID
22 |
23 | // Call GetCategoryByID function
24 | category, err := client.GetCategoryByID(categoryID)
25 | if err != nil {
26 | log.Fatalf("Error fetching category by ID: %v", err)
27 | }
28 |
29 | // Pretty print the category details
30 | fmt.Printf("Fetched Category Details:\nID: %s\nName: %s\nPriority: %d\n",
31 | category.Id, category.Name, category.Priority)
32 | }
33 |
--------------------------------------------------------------------------------
/examples/categories/GetCategoryNameByID/GetCategoryNameByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define the category name to search for
21 | categoryName := "test" // Replace with the desired category name
22 |
23 | // Call GetCategoryNameByID function
24 | category, err := client.GetCategoryByName(categoryName)
25 | if err != nil {
26 | log.Fatalf("Error fetching category by name: %v", err)
27 | }
28 |
29 | // Print the category details
30 | fmt.Printf("Fetched Category Details:\nID: %s\nName: %s\nPriority: %d\n",
31 | category.Id, category.Name, category.Priority)
32 | }
33 |
--------------------------------------------------------------------------------
/examples/certificate_authority/GetActiveCertificateAuthority/GetActiveCertificateAuthority.go:
--------------------------------------------------------------------------------
1 | // get_active_certificate_authority_main.go
2 | package main
3 |
4 | import (
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // Retrieve the active certificate authority details
22 | activeCertAuth, err := client.GetActiveCertificateAuthority()
23 | if err != nil {
24 | log.Fatalf("Error retrieving active certificate authority: %s", err)
25 | }
26 |
27 | fmt.Printf("Active Certificate Authority: %+v\n", activeCertAuth)
28 | }
29 |
--------------------------------------------------------------------------------
/examples/classes/DeleteClassByID/DeleteClassByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // The ID of the class you want to delete
21 | classIDToDelete := "123" // Replace with the actual ID
22 |
23 | // Call the delete function with the class ID
24 | err = client.DeleteClassByID(classIDToDelete)
25 | if err != nil {
26 | log.Fatalf("Error deleting class by ID: %v", err)
27 | } else {
28 | fmt.Printf("Class with ID %s deleted successfully.\n", classIDToDelete)
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/examples/classes/DeleteClassByName/DeleteClassByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // The name of the class you want to delete
21 | classNameToDelete := "Math 101" // Replace with the actual class name
22 |
23 | // Call the delete function with the class name
24 | err = client.DeleteClassByName(classNameToDelete)
25 | if err != nil {
26 | log.Fatalf("Error deleting class by name: %v", err)
27 | } else {
28 | fmt.Printf("Class with name %s deleted successfully.\n", classNameToDelete)
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/examples/classes/GetClasses/GetClasses.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Get all classes
21 | classesList, err := client.GetClasses()
22 | if err != nil {
23 | log.Fatalf("Error fetching classes: %s\n", err)
24 | }
25 |
26 | fmt.Printf("Total classes: %d\n", classesList.Size)
27 | for _, class := range classesList.Classes {
28 | fmt.Printf("Class ID: %d, Name: %s, Description: %s\n", class.ID, class.Name, class.Description)
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/examples/classes/GetClassesByID/GetClassesByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 | "strconv"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | classID := "1" // Replace with the actual ID of the class you want to fetch
22 |
23 | // Get class by ID
24 | class, err := client.GetClassByID(classID)
25 | if err != nil {
26 | log.Fatalf("Error fetching class by ID: %s\n", err)
27 | }
28 |
29 | fmt.Printf("Class ID: %v, Name: %s, Description: %s\n", strconv.Itoa(class.ID), class.Name, class.Description)
30 | // Output additional class details as needed
31 | }
32 |
--------------------------------------------------------------------------------
/examples/classes/GetClassesByName/GetClassesByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | className := "Math 101" // Replace with the actual name of the class you want to fetch
21 |
22 | // Get class by name
23 | class, err := client.GetClassByName(className)
24 | if err != nil {
25 | log.Fatalf("Error fetching class by name: %s\n", err)
26 | }
27 |
28 | fmt.Printf("Class Name: %s, ID: %d, Description: %s\n", class.Name, class.ID, class.Description)
29 | // Output additional class details as needed
30 | }
31 |
--------------------------------------------------------------------------------
/examples/client_checkin_settings/GetClientCheckinSettings/GetClientCheckinSettings.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | clientChecinInfo, err := client.GetClientCheckinSettings()
22 | if err != nil {
23 | log.Fatalf("Failed to get client checkin info, %v", err)
24 | }
25 |
26 | checkinInfoJson, err := json.MarshalIndent(clientChecinInfo, "", " ")
27 | if err != nil {
28 | log.Fatalf("Failed to marshal json, %v", err)
29 | }
30 |
31 | fmt.Println(string(checkinInfoJson))
32 | }
33 |
--------------------------------------------------------------------------------
/examples/cloud_ldap/DeleteCloudIdentityProviderLdapByID/DeleteCloudIdentityProviderLdapByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/Shared/GitHub/go-api-sdk-jamfpro/localtesting/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define the ID of the Cloud LDAP configuration you want to delete
21 | ldapID := "1022" // Replace with your actual LDAP configuration ID
22 |
23 | // Delete the Cloud LDAP configuration
24 | err = client.DeleteCloudIdentityProviderLdapByID(ldapID)
25 | if err != nil {
26 | log.Fatalf("Error deleting cloud LDAP configuration: %v", err)
27 | }
28 |
29 | fmt.Printf("Successfully deleted Cloud LDAP configuration with ID: %s\n", ldapID)
30 | }
31 |
--------------------------------------------------------------------------------
/examples/cloud_ldap/VerifyKeystore/VerifyKeystore.go:
--------------------------------------------------------------------------------
1 | package main
2 |
--------------------------------------------------------------------------------
/examples/computer_extension_attributes/DeleteComputerExtensionAttributeByID/DeleteComputerExtensionAttributeByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | AttributeIDToDelete := "1" // Replace 1 with the actual attribute ID
21 |
22 | // Deleting the attribute with specified ID
23 | err = client.DeleteComputerExtensionAttributeByID(AttributeIDToDelete)
24 | if err != nil {
25 | log.Fatalf("Error deleting Computer Extension Attribute by ID: %v", err)
26 | }
27 |
28 | fmt.Printf("Successfully deleted Computer Extension Attribute with ID: %d\n", AttributeIDToDelete)
29 | }
30 |
--------------------------------------------------------------------------------
/examples/computer_inventory/DeleteAttachmentByIDAndComputerID/DeleteAttachmentByIDAndComputerID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | computerID := "8" // Example computer ID
21 | attachmentID := "2" // ID of the attachment to be deleted
22 |
23 | err = client.DeleteAttachmentByIDAndComputerID(computerID, attachmentID)
24 | if err != nil {
25 | log.Fatalf("Error deleting attachment: %v", err)
26 | }
27 |
28 | fmt.Println("Attachment deleted successfully.")
29 | }
30 |
--------------------------------------------------------------------------------
/examples/computer_inventory/DeleteComputerInventoryByID/DeleteComputerInventoryByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Example: Delete a computer inventory with a specific ID
21 | computerID := "9" // Replace with the actual computer ID
22 |
23 | err = client.DeleteComputerInventoryByID(computerID)
24 | if err != nil {
25 | fmt.Println("Error deleting computer inventory:", err)
26 | } else {
27 | fmt.Println("Computer inventory deleted successfully")
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/examples/computer_inventory/EraseComputerByID/EraseComputerByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Set up the device pin request
21 | devicePin := jamfpro.RequestEraseDeviceComputer{
22 | Pin: nil, // or the six-character : Pin: &"123456" for Find My.
23 | }
24 |
25 | // Call Function to erase computer with ID "1"
26 | err = client.EraseComputerByID("1", devicePin)
27 | if err != nil {
28 | log.Fatalf("Error erasing computer: %v", err)
29 | }
30 |
31 | fmt.Printf("Successfully initiated erase for computer with ID: %s\n", "1")
32 | }
33 |
--------------------------------------------------------------------------------
/examples/computer_inventory/RemoveComputerMDMProfile/RemoveComputerMDMProfile.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Example: Remove the MDM profile for a computer with a specific ID
21 | computerID := "9" // Replace with the actual computer ID
22 |
23 | response, err := client.RemoveComputerMDMProfile(computerID)
24 | if err != nil {
25 | fmt.Println("Error removing MDM profile:", err)
26 | } else {
27 | fmt.Printf("MDM profile removed successfully. Device ID: %s, Command UUID: %s\n", response.DeviceID, response.CommandUUID)
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/examples/computer_invitations/DeleteComputerInvitationByID/DeleteComputerInvitationByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 | "os"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // The ID of the computer invitation you wish to delete.
22 | invitationID := "1" // Replace with the actual ID.
23 |
24 | // Call the function to delete the computer invitation by ID.
25 | err = client.DeleteComputerInvitationByID(invitationID)
26 | if err != nil {
27 | fmt.Fprintf(os.Stderr, "Error deleting computer invitation by ID: %v\n", err)
28 | os.Exit(1)
29 | }
30 |
31 | fmt.Println("Computer invitation deleted successfully.")
32 | }
33 |
--------------------------------------------------------------------------------
/examples/computer_invitations/GetComputerInvitationByID/GetComputerInvitationByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | invitationID := "1" // Replace with the actual invitation ID you want to retrieve
21 |
22 | invitation, err := client.GetComputerInvitationByID(invitationID)
23 | if err != nil {
24 | fmt.Printf("Error fetching computer invitation by ID: %s\n", err)
25 | return
26 | }
27 |
28 | fmt.Printf("Invitation Details: %+v\n", invitation)
29 | }
30 |
--------------------------------------------------------------------------------
/examples/computer_invitations/GetComputerInvitationsByInvitationID/GetComputerInvitationsByInvitationID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Replace with the actual invitation ID you want to fetch
21 | invitationID := "1"
22 |
23 | invitation, err := client.GetComputerInvitationByInvitationID(invitationID)
24 | if err != nil {
25 | log.Fatalf("Error fetching computer invitation by ID: %s", err)
26 | }
27 |
28 | fmt.Printf("Invitation Details: %+v\n", invitation)
29 | }
30 |
--------------------------------------------------------------------------------
/examples/computer_prestages/DeleteComputerPrestageByID/DeleteComputerPrestageByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // The ID of the computer prestage you want to delete
21 | prestageID := "1"
22 |
23 | // Call DeleteComputerPrestageByID to delete the prestage
24 | err = client.DeleteComputerPrestageByID(prestageID)
25 | if err != nil {
26 | log.Fatalf("Error deleting computer prestage: %v", err)
27 | }
28 |
29 | // Print a confirmation message
30 | fmt.Println("Computer prestage deleted successfully.")
31 | }
32 |
--------------------------------------------------------------------------------
/examples/computer_prestages/DeleteComputerPrestageByNameByID/DeleteComputerPrestageByNameByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // The name of the computer prestage you want to delete
21 | prestageName := "YOUR_PRESTAGE_NAME_HERE"
22 |
23 | // Call DeleteComputerPrestageByName to delete the prestage by its name
24 | err = client.DeleteComputerPrestageByName(prestageName)
25 | if err != nil {
26 | log.Fatalf("Error deleting computer prestage by name: %v", err)
27 | }
28 |
29 | // Print a confirmation message
30 | fmt.Println("Computer prestage deleted successfully.")
31 | }
32 |
--------------------------------------------------------------------------------
/examples/computers/DeleteComputerByID/DeleteComputerByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | computerID := "1" // Replace with actual computer ID
21 |
22 | err = client.DeleteComputerByID(computerID)
23 | if err != nil {
24 | log.Fatalf("Error deleting computer by ID: %v", err)
25 | }
26 |
27 | fmt.Printf("Successfully deleted computer with ID: %d\n", computerID)
28 | }
29 |
--------------------------------------------------------------------------------
/examples/computers/DeleteComputerByName/DeleteComputerByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | computerName := "admin’s MacBook Pro" // Replace with actual computer name
21 |
22 | err = client.DeleteComputerByName(computerName)
23 | if err != nil {
24 | log.Fatalf("Error deleting computer by name: %v", err)
25 | }
26 |
27 | fmt.Printf("Successfully deleted computer with name: %s\n", computerName)
28 | }
29 |
--------------------------------------------------------------------------------
/examples/computers/GetComputers/GetComputers.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Call the GetComputers method
21 | computers, err := client.GetComputers()
22 | if err != nil {
23 | log.Fatalf("Error fetching computers: %v", err)
24 | }
25 |
26 | // Print out the fetched computers
27 | fmt.Println("Fetched Computers:")
28 | for _, computer := range computers.Results {
29 | fmt.Printf("ID: %d, Name: %s\n", computer.ID, computer.Name)
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/examples/csa/DeleteCSAExchange/DeleteCSAExchange.go:
--------------------------------------------------------------------------------
1 | // TODO
2 | package main
3 |
--------------------------------------------------------------------------------
/examples/csa/GetCSAExchangeInfo/GetCSAExchangeInfo.go:
--------------------------------------------------------------------------------
1 | // TODO
2 | package main
3 |
--------------------------------------------------------------------------------
/examples/csa/InitCSAExchange/InitCSAExchange.go:
--------------------------------------------------------------------------------
1 | // TODO
2 | package main
3 |
--------------------------------------------------------------------------------
/examples/csa/RefreshCSATokenExchange/RefreshCSAExchange.go:
--------------------------------------------------------------------------------
1 | // TODO
2 | package main
3 |
--------------------------------------------------------------------------------
/examples/declarative_device_management/ForceDDMSync/ForceDDMSync.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | // Define the client management ID for which to force DDM sync
20 | clientManagementID := "10" // Replace with the actual client management ID
21 |
22 | // Call ForceDDMSync function
23 | err = client.ForceDDMSync(clientManagementID)
24 | if err != nil {
25 | log.Fatalf("Error forcing DDM sync: %v", err)
26 | }
27 |
28 | fmt.Printf("Successfully forced DDM sync for client management ID: %s\n", clientManagementID)
29 | }
30 |
--------------------------------------------------------------------------------
/examples/departments/DeleteDepartmentByID/DeleteDepartmentByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Let's assume you want to delete a department with ID 123.
21 | departmentID := "37286"
22 |
23 | // Call DeleteDepartmentByID function
24 | err = client.DeleteDepartmentByID(departmentID)
25 | if err != nil {
26 | log.Fatalf("Error deleting department by ID: %v", err)
27 | }
28 |
29 | // Print success message
30 | fmt.Println("Deleted Department Successfully!")
31 | }
32 |
--------------------------------------------------------------------------------
/examples/departments/DeleteDepartmentByName/DeleteDepartmentByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Let's assume you want to delete a department with the name "HR Department"
21 | departmentName := "TestNewName"
22 |
23 | // Call DeleteDepartmentByName function
24 | err = client.DeleteDepartmentByName(departmentName)
25 | if err != nil {
26 | log.Fatalf("Error deleting department by name: %v", err)
27 | }
28 |
29 | // Print success message
30 | fmt.Println("Deleted Department Successfully!")
31 | }
32 |
--------------------------------------------------------------------------------
/examples/departments/GetDepartmentByID/GetDepartmentByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | departmentID := "37287"
22 |
23 | department, err := client.GetDepartmentByID(departmentID)
24 | if err != nil {
25 | log.Fatalf("Error fetching department by ID: %v", err)
26 | }
27 |
28 | departmentJSON, err := json.MarshalIndent(department, "", " ")
29 | if err != nil {
30 | log.Fatalf("Error marshaling department data: %v", err)
31 | }
32 | fmt.Println("Fetched Department:\n", string(departmentJSON))
33 | }
34 |
--------------------------------------------------------------------------------
/examples/device_communication_settings/GetDeviceCommunicationSettings/GetDeviceCommunicationSettings.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | clientChecinInfo, err := client.GetDeviceCommunicationSettings()
22 | if err != nil {
23 | log.Fatalf("Failed to get client checkin info, %v", err)
24 | }
25 |
26 | checkinInfoJson, err := json.MarshalIndent(clientChecinInfo, "", " ")
27 | if err != nil {
28 | log.Fatalf("Failed to marshal json, %v", err)
29 | }
30 |
31 | fmt.Println(string(checkinInfoJson))
32 | }
33 |
--------------------------------------------------------------------------------
/examples/device_enrollments/DeleteDeviceEnrollmentByID/DeleteDeviceEnrollmentByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Delete device enrollment
21 | deviceEnrollmentID := "1" // Using the known device enrollment ID
22 | err = client.DeleteDeviceEnrollmentByID(deviceEnrollmentID)
23 | if err != nil {
24 | log.Fatalf("Error deleting device enrollment: %v", err)
25 | }
26 |
27 | fmt.Printf("Successfully deleted device enrollment with ID: %s\n", deviceEnrollmentID)
28 | }
29 |
--------------------------------------------------------------------------------
/examples/device_enrollments/GetDeviceEnrollmentsPublicKey/GetDeviceEnrollmentsPublicKey.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/Shared/GitHub/go-api-sdk-jamfpro/localtesting/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Call the GetDeviceEnrollmentsPublicKey method to retrieve the public key
21 | response, err := client.GetDeviceEnrollmentsPublicKey()
22 | if err != nil {
23 | log.Fatalf("Failed to retrieve Public Key: %v", err)
24 | }
25 | fmt.Print(response)
26 | }
27 |
--------------------------------------------------------------------------------
/examples/directory_bindings/DeleteDirectoryBindingByID/DeleteDirectoryBindingByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Example ID of the directory binding to delete
21 | bindingID := "1" // Assuming an existing binding ID
22 |
23 | // Delete directory binding by ID
24 | err = client.DeleteDirectoryBindingByID(bindingID)
25 | if err != nil {
26 | fmt.Println("Error deleting directory binding by ID:", err)
27 | return
28 | }
29 | fmt.Println("Successfully deleted Directory Binding by ID")
30 | }
31 |
--------------------------------------------------------------------------------
/examples/directory_bindings/DeleteDirectoryBindingByName/DeleteDirectoryBindingByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Example name of the directory binding to delete
21 |
22 | bindingName := "New Binding" // Assuming an existing binding name
23 |
24 | // Delete directory binding by Name
25 | err = client.DeleteDirectoryBindingByName(bindingName)
26 | if err != nil {
27 | fmt.Println("Error deleting directory binding by Name:", err)
28 | return
29 | }
30 | fmt.Println("Successfully deleted Directory Binding by Name")
31 | }
32 |
--------------------------------------------------------------------------------
/examples/disk_encryption_configurations/DeleteDiskEncryptionConfigurationByID/DeleteDiskEncryptionConfigurationByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "log"
5 |
6 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
7 | )
8 |
9 | func main() {
10 | // Define the path to the JSON configuration file
11 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
12 |
13 | // Initialize the Jamf Pro client with the HTTP client configuration
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | err = client.DeleteDiskEncryptionConfigurationByID("1")
20 | if err != nil {
21 | log.Fatalf("Error deleting Disk Encryption Configuration by ID: %v", err)
22 | }
23 |
24 | log.Println("Deleted Disk Encryption Configuration by ID successfully.")
25 | }
26 |
--------------------------------------------------------------------------------
/examples/disk_encryption_configurations/DeleteDiskEncryptionConfigurationByName/DeleteDiskEncryptionConfigurationByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "log"
5 |
6 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
7 | )
8 |
9 | func main() {
10 | // Define the path to the JSON configuration file
11 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
12 |
13 | // Initialize the Jamf Pro client with the HTTP client configuration
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | err = client.DeleteDiskEncryptionConfigurationByName("Corporate Encryption")
20 | if err != nil {
21 | log.Fatalf("Error deleting Disk Encryption Configuration by Name: %v", err)
22 | }
23 |
24 | log.Println("Deleted Disk Encryption Configuration by Name successfully.")
25 | }
26 |
--------------------------------------------------------------------------------
/examples/dock_items/DeleteDockItemsByID/DeleteDockItemsByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define the ID of the dock item to delete
21 | dockItemID := "1" // Replace with the actual ID
22 |
23 | // Call the DeleteDockItemsByID function
24 | err = client.DeleteDockItemByID(dockItemID)
25 | if err != nil {
26 | log.Fatalf("Error deleting dock item by ID: %v", err)
27 | }
28 |
29 | fmt.Printf("Successfully deleted dock item with ID: %d\n", dockItemID)
30 | }
31 |
--------------------------------------------------------------------------------
/examples/dock_items/DeleteDockItemsByName/DeleteDockItemsByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define the name of the dock item to delete
21 | dockItemName := "Safari" // Replace with the actual name
22 |
23 | // Call the DeleteDockItemsByName function
24 | err = client.DeleteDockItemByName(dockItemName)
25 | if err != nil {
26 | log.Fatalf("Error deleting dock item by name: %v", err)
27 | }
28 |
29 | fmt.Printf("Successfully deleted dock item with name: %s\n", dockItemName)
30 | }
31 |
--------------------------------------------------------------------------------
/examples/dock_items/GetDockItems/GetDockItems.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/xml"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // Call the GetDockItems function
22 | dockItems, err := client.GetDockItems()
23 | if err != nil {
24 | log.Fatalf("Error fetching dock items: %v", err)
25 | }
26 |
27 | // Pretty print the updated group in XML
28 | groupXML, err := xml.MarshalIndent(dockItems, "", " ") // Indent with 4 spaces
29 | if err != nil {
30 | log.Fatalf("Error marshaling Computer Group data: %v", err)
31 | }
32 | fmt.Println("Updated Computer Group:\n", string(groupXML))
33 | }
34 |
--------------------------------------------------------------------------------
/examples/ebooks/DeleteEbookByID/DeleteEbookByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | ebookID := "1" // Replace with the actual eBook ID
21 |
22 | err = client.DeleteEbookByID(ebookID)
23 | if err != nil {
24 | log.Fatalf("Error deleting ebook by ID: %v", err)
25 | }
26 |
27 | fmt.Println("Ebook successfully deleted by ID")
28 | }
29 |
--------------------------------------------------------------------------------
/examples/ebooks/DeleteEbookByName/DeleteEbookByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | ebookName := "iPhone User Guide for iOS 10.3" // Replace with the actual eBook name
21 |
22 | err = client.DeleteEbookByName(ebookName)
23 | if err != nil {
24 | log.Fatalf("Error deleting ebook by Name: %v", err)
25 | }
26 |
27 | fmt.Println("Ebook successfully deleted by Name")
28 | }
29 |
--------------------------------------------------------------------------------
/examples/ebooks/GetEbooks/GetEbooks.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Call the GetEbooks function
21 | ebooks, err := client.GetEbooks()
22 | if err != nil {
23 | log.Fatalf("Error fetching eBooks: %v", err)
24 | }
25 |
26 | // Output the fetched eBooks
27 | fmt.Printf("Fetched eBooks: %+v\n", ebooks)
28 | }
29 |
--------------------------------------------------------------------------------
/examples/engage_settings/GetEngageSettings/GetEngageSettings.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/neilmartin/GitHub/go-api-sdk-jamfpro/localtesting/config.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | engageInfo, err := client.GetEngageSettings()
22 | if err != nil {
23 | log.Fatalf("Failed to get engage info, %v", err)
24 | }
25 |
26 | engageInfoJson, err := json.MarshalIndent(engageInfo, "", " ")
27 | if err != nil {
28 | log.Fatalf("Failed to marshal json, %v", err)
29 | }
30 |
31 | fmt.Println(string(engageInfoJson))
32 | }
33 |
--------------------------------------------------------------------------------
/examples/engage_settings/UpdateEngageSettings/UpdateEngageSettings.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/neilmartin/GitHub/go-api-sdk-jamfpro/localtesting/config.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | settingsUpdate := jamfpro.ResourceEngageSettings{
22 | IsEnabled: false,
23 | }
24 |
25 | engageInfo, err := client.UpdateEngageSettings(settingsUpdate)
26 | if err != nil {
27 | log.Fatalf("Failed to get engage info, %v", err)
28 | }
29 |
30 | engageInfoJson, err := json.MarshalIndent(engageInfo, "", " ")
31 | if err != nil {
32 | log.Fatalf("Failed to marshal json, %v", err)
33 | }
34 |
35 | fmt.Println(string(engageInfoJson))
36 | }
37 |
--------------------------------------------------------------------------------
/examples/enrollment/DeleteMultipleEnrollmentMessagesByLanguageIDs/DeleteMultipleEnrollmentMessagesByLanguageIDs.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define the language IDs to delete
21 | languageIds := []string{"fr", "ji"}
22 |
23 | // Call DeleteMultipleEnrollmentMessagesByLanguageIDs function
24 | err = client.DeleteMultipleEnrollmentMessagesByLanguageIDs(languageIds)
25 | if err != nil {
26 | log.Fatalf("Error deleting enrollment language messages: %v", err)
27 | }
28 |
29 | fmt.Printf("Successfully deleted enrollment messages for languages: %v\n", languageIds)
30 | }
31 |
--------------------------------------------------------------------------------
/examples/enrollment/GetEnrollment/GetEnrollment.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // Call GetEnrollment function
22 | enrollment, err := client.GetEnrollment()
23 | if err != nil {
24 | log.Fatalf("Error getting enrollment configuration: %v", err)
25 | }
26 |
27 | // Pretty print the enrollment configuration in JSON
28 | JSON, err := json.MarshalIndent(enrollment, "", " ") // Indent with 4 spaces
29 | if err != nil {
30 | log.Fatalf("Error marshaling enrollment data: %v", err)
31 | }
32 | fmt.Println("Current Enrollment Configuration:\n", string(JSON))
33 | }
34 |
--------------------------------------------------------------------------------
/examples/enrollment/GetEnrollmentLanguageCodes/GetEnrollmentLanguageCodes.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | languageCodes, err := client.GetEnrollmentLanguageCodes()
20 | if err != nil {
21 | log.Fatalf("Error getting enrollment language codes: %v", err)
22 | }
23 |
24 | JSON, err := json.MarshalIndent(languageCodes, "", " ") // Indent with 4 spaces
25 | if err != nil {
26 | log.Fatalf("Error marshaling language codes data: %v", err)
27 | }
28 | fmt.Println("Available Language Codes:\n", string(JSON))
29 | }
30 |
--------------------------------------------------------------------------------
/examples/enrollment_customizations/DeleteEnrollmentCustomization/DeleteEnrollmentCustomizationByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define the ID of the enrollment customization to delete
21 | customizationID := "2" // Replace with your actual ID
22 |
23 | // Delete the enrollment customization
24 | err = client.DeleteEnrollmentCustomizationByID(customizationID)
25 | if err != nil {
26 | log.Fatalf("Failed to delete enrollment customization: %v", err)
27 | }
28 |
29 | fmt.Printf("Successfully deleted enrollment customization with ID: %s\n", customizationID)
30 | }
31 |
--------------------------------------------------------------------------------
/examples/enrollment_customizations/UploadEnrollmentCustomizationsImage/self_service.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deploymenttheory/go-api-sdk-jamfpro/ba55cb4a3121bdb0f6a1bc18f3572e547644bbef/examples/enrollment_customizations/UploadEnrollmentCustomizationsImage/self_service.png
--------------------------------------------------------------------------------
/examples/enrollment_settings/GetADUESessionTokenSettings/GetADUESessionTokenSettings.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | adueSettings, err := client.GetADUESessionTokenSettings()
22 |
23 | jsonData, err := json.MarshalIndent(adueSettings, "", " ") // Indent with 4 spaces
24 | if err != nil {
25 | log.Fatalf("Error marshaling data: %v", err)
26 | }
27 | fmt.Println("Fetched data:\n", string(jsonData))
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/examples/enrollment_settings/GetEnrollmentSettings/GetEnrollmentSettings.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | resp, err := client.GetEnrollmentSettings()
21 | if err != nil {
22 | log.Fatalf("Error fetching Enrollment Settings: %v", err)
23 | }
24 |
25 | jsonData, err := json.MarshalIndent(resp, "", " ") // Indent with 4 spaces
26 | if err != nil {
27 | log.Fatalf("Error marshaling data: %v", err)
28 | }
29 | fmt.Println("Fetched data:\n", string(jsonData))
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/examples/file_share_distribution_points/DeleteFileShareDistributionPointByID/DeleteFileShareDistributionPointByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // ID of the distribution point to delete
21 | distributionPointID := "1" // Replace with the actual ID
22 |
23 | // Call DeleteDistributionPointByID function
24 | err = client.DeleteDistributionPointByID(distributionPointID)
25 | if err != nil {
26 | log.Fatalf("Error deleting distribution point: %v", err)
27 | }
28 |
29 | fmt.Println("Distribution Point deleted successfully")
30 | }
31 |
--------------------------------------------------------------------------------
/examples/ibeacons/CreateIBeacon/CreateIBeacon.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define the new iBeacon details
21 | newBeacon := &jamfpro.ResourceIBeacons{
22 | Name: "Room 1 Beacon",
23 | UUID: "55900BDC-347C-58B1-D249-F32244B11D30",
24 | Major: -1,
25 | Minor: -1,
26 | }
27 |
28 | // Call the CreateIBeacon function
29 | createdBeacon, err := client.CreateIBeacon(newBeacon)
30 | if err != nil {
31 | log.Fatalf("Error creating iBeacon: %v", err)
32 | }
33 |
34 | fmt.Printf("Created iBeacon: %+v\n", createdBeacon)
35 | }
36 |
--------------------------------------------------------------------------------
/examples/ibeacons/DeleteIBeaconByID/DeleteIBeaconByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | iBeaconID := "1" // Replace with the actual iBeacon ID
21 |
22 | err = client.DeleteIBeaconByID(iBeaconID)
23 | if err != nil {
24 | log.Fatalf("Error deleting iBeacon by ID: %v", err)
25 | }
26 |
27 | fmt.Println("iBeacon successfully deleted by ID")
28 | }
29 |
--------------------------------------------------------------------------------
/examples/ibeacons/DeleteIBeaconByName/DeleteIBeaconByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | iBeaconName := "Room 1 Beacon" // Replace with the actual iBeacon Name
21 |
22 | err = client.DeleteIBeaconByName(iBeaconName)
23 | if err != nil {
24 | log.Fatalf("Error deleting iBeacon by ID: %v", err)
25 | }
26 |
27 | fmt.Println("iBeacon successfully deleted by ID")
28 | }
29 |
--------------------------------------------------------------------------------
/examples/ibeacons/GetIBeaconByID/GetIBeaconByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/xml"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // Replace with the actual ID
22 | beaconID := "1"
23 |
24 | iBeacon, err := client.GetIBeaconByID(beaconID)
25 | if err != nil {
26 | log.Fatalf("Error retrieving iBeacon by ID: %v", err)
27 | }
28 |
29 | // Pretty print the iBeacon details
30 | XML, err := xml.MarshalIndent(iBeacon, "", " ") // Indent with 4 spaces
31 | if err != nil {
32 | log.Fatalf("Error marshaling accounts data: %v", err)
33 | }
34 | fmt.Println("Fetched Accounts List:", string(XML))
35 | }
36 |
--------------------------------------------------------------------------------
/examples/ibeacons/GetIBeacons/GetIBeacons.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/xml"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // Call the GetIBeacons function
22 | iBeacons, err := client.GetIBeacons()
23 | if err != nil {
24 | log.Fatalf("Error retrieving iBeacons: %v", err)
25 | }
26 |
27 | // Pretty print the iBeacon details
28 | XML, err := xml.MarshalIndent(iBeacons, "", " ") // Indent with 4 spaces
29 | if err != nil {
30 | log.Fatalf("Error marshaling accounts data: %v", err)
31 | }
32 | fmt.Println("Fetched Accounts List:", string(XML))
33 | }
34 |
--------------------------------------------------------------------------------
/examples/ibeacons/UpdateIBeaconByID/UpdateIBeaconByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | updatedBeacon := &jamfpro.ResourceIBeacons{
21 | ID: 1, // The ID of the iBeacon to update
22 | Name: "Room 1 Beacon Updated",
23 | UUID: "55900BDC-347C-58B1-D249-F32244B11D30",
24 | Major: -1,
25 | Minor: -1,
26 | }
27 |
28 | result, err := client.UpdateIBeaconByID("1", updatedBeacon)
29 | if err != nil {
30 | log.Fatalf("Error updating iBeacon: %v", err)
31 | }
32 |
33 | fmt.Printf("Updated iBeacon: %+v\n", result)
34 | }
35 |
--------------------------------------------------------------------------------
/examples/ibeacons/UpdateIBeaconByName/UpdateIBeaconByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | updatedBeacon := &jamfpro.ResourceIBeacons{
21 | Name: "Room 1 Beacon Updated",
22 | UUID: "55900BDC-347C-58B1-D249-F32244B11D30",
23 | Major: -1,
24 | Minor: -1,
25 | }
26 |
27 | result, err := client.UpdateIBeaconByName("Room 1 Beacon", updatedBeacon)
28 | if err != nil {
29 | log.Fatalf("Error updating iBeacon: %v", err)
30 | }
31 |
32 | fmt.Printf("Updated iBeacon: %+v\n", result)
33 | }
34 |
--------------------------------------------------------------------------------
/examples/icon/GetIconByID/GetIconByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | iconID := 28
20 |
21 | response, err := client.GetIconByID(iconID)
22 | if err != nil {
23 | log.Fatalf("Failed to get icon: %v", err)
24 | }
25 |
26 | // Pretty print the icon details
27 | iconJSON, err := json.MarshalIndent(response, "", " ")
28 | if err != nil {
29 | log.Fatalf("Error marshaling accounts data: %v", err)
30 | }
31 | fmt.Println("Fetched Icon:", string(iconJSON))
32 | }
33 |
--------------------------------------------------------------------------------
/examples/icon/UploadIcon/UploadIcon.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | // Define the path to the icon file
20 | iconPath := "/Users/dafyddwatkins/GitHub/deploymenttheory/go-api-sdk-jamfpro/examples/icon/UploadIcon/cat.png"
21 |
22 | response, err := client.UploadIcon(iconPath)
23 | if err != nil {
24 | fmt.Println("Error uploading icon:", err)
25 | return
26 | }
27 |
28 | // Pretty print the icon details
29 | iconJSON, err := json.MarshalIndent(response, "", " ") // Indent with 4 spaces
30 | if err != nil {
31 | log.Fatalf("Error marshaling accounts data: %v", err)
32 | }
33 | fmt.Println("Fetched Icon:", string(iconJSON))
34 | }
35 |
--------------------------------------------------------------------------------
/examples/icon/UploadIcon/cat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deploymenttheory/go-api-sdk-jamfpro/ba55cb4a3121bdb0f6a1bc18f3572e547644bbef/examples/icon/UploadIcon/cat.png
--------------------------------------------------------------------------------
/examples/jamf_api_integrations/DeleteApiIntegrationByID/DeleteApiIntegrationByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | integrationID := "1" // Replace with the actual API Integration ID
21 |
22 | if err := client.DeleteApiIntegrationByID(integrationID); err != nil {
23 | fmt.Println("Error deleting API Integration:", err)
24 | return
25 | }
26 |
27 | fmt.Printf("API Integration with ID %d deleted successfully\n", integrationID)
28 | }
29 |
--------------------------------------------------------------------------------
/examples/jamf_api_integrations/DeleteApiIntegrationByName/DeleteApiIntegrationByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | integrationName := "API Integration Name" // Replace with the actual API Integration name
21 |
22 | if err := client.DeleteApiIntegrationByName(integrationName); err != nil {
23 | fmt.Println("Error deleting API Integration:", err)
24 | return
25 | }
26 |
27 | fmt.Printf("API Integration with name %s deleted successfully\n", integrationName)
28 | }
29 |
--------------------------------------------------------------------------------
/examples/jamf_api_roles/DeleteJamfApiRoleByID/DeleteJamfApiRoleByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "log"
5 |
6 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
7 | )
8 |
9 | func main() {
10 | // Define the path to the JSON configuration file
11 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
12 |
13 | // Initialize the Jamf Pro client with the HTTP client configuration
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | // Define the ID of the Jamf API Role you want to delete
20 | roleID := "13"
21 |
22 | // Call DeleteJamfApiRoleByID function
23 | err = client.DeleteJamfApiRoleByID(roleID)
24 | if err != nil {
25 | log.Fatalf("Error deleting Jamf API role by ID: %v", err)
26 | }
27 |
28 | log.Println("Successfully deleted the Jamf API role.")
29 | }
30 |
--------------------------------------------------------------------------------
/examples/jamf_api_roles/DeleteJamfApiRoleByName/DeleteJamfApiRoleByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "log"
5 |
6 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
7 | )
8 |
9 | func main() {
10 | // Define the path to the JSON configuration file
11 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
12 |
13 | // Initialize the Jamf Pro client with the HTTP client configuration
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | // Define the name of the Jamf API Role you want to delete
20 | roleName := "One Role to Rule them all"
21 |
22 | // Call DeleteJamfApiRoleByName function
23 | err = client.DeleteJamfApiRoleByName(roleName)
24 | if err != nil {
25 | log.Fatalf("Error deleting Jamf API role by name: %v", err)
26 | }
27 |
28 | log.Println("Successfully deleted Jamf API Role with name:", roleName)
29 | }
30 |
--------------------------------------------------------------------------------
/examples/jamf_connect/RetryJamfConnectDeploymentTasksByConfigProfileUUID/RetryJamfConnectDeploymentTasksByConfigProfileUUID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "log"
5 |
6 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
7 | )
8 |
9 | func main() {
10 | // Define the path to the JSON configuration file
11 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
12 |
13 | // Initialize the Jamf Pro client with the HTTP client configuration
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | // Example config profile UUID and computer IDs to retry
20 | configProfileUUID := "5ec9527a-40da-4633-9ccc-7fc3fecea1dc"
21 | computerIDs := []string{"1", "2"}
22 |
23 | err = client.RetryJamfConnectDeploymentTasksByConfigProfileUUID(configProfileUUID, computerIDs)
24 | if err != nil {
25 | log.Fatalf("Error retrying tasks: %v", err)
26 | }
27 |
28 | log.Println("Successfully requested task retry")
29 | }
30 |
--------------------------------------------------------------------------------
/examples/jamf_content_distribution_server/GetJCDS2Packages/GetJCDS2Packages.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // Call Function
22 | JCDS2Files, err := client.GetJCDS2Packages()
23 | if err != nil {
24 | log.Fatalf("Error fetching JCDS 2 packages: %v", err)
25 | }
26 |
27 | // Pretty print the JSON
28 | response, err := json.MarshalIndent(JCDS2Files, "", " ") // Indent with 4 spaces
29 | if err != nil {
30 | log.Fatalf("Error marshaling JCDS 2 package data: %v", err)
31 | }
32 | fmt.Println("Fetched JCDS 2 packages:\n", string(response))
33 | }
34 |
--------------------------------------------------------------------------------
/examples/jamf_content_distribution_server/GetJCDS2Properties/GetJCDS2Properties.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // Call Function
22 | JCDS2Files, err := client.GetJCDS2Properties()
23 | if err != nil {
24 | log.Fatalf("Error fetching JCDS 2 properties: %v", err)
25 | }
26 |
27 | // Pretty print the JSON
28 | response, err := json.MarshalIndent(JCDS2Files, "", " ") // Indent with 4 spaces
29 | if err != nil {
30 | log.Fatalf("Error marshaling JCDS 2 package data: %v", err)
31 | }
32 | fmt.Println("Fetched JCDS 2 properties:\n", string(response))
33 | }
34 |
--------------------------------------------------------------------------------
/examples/jamf_content_distribution_server/RefreshJCDS2Inventory/RefreshJCDS2Inventory.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Call Function to refresh JCDS2 inventory
21 | err = client.RefreshJCDS2Inventory()
22 | if err != nil {
23 | log.Fatalf("Error refreshing JCDS 2.0 inventory: %v", err)
24 | }
25 |
26 | fmt.Println("Successfully refreshed JCDS 2.0 inventory")
27 | }
28 |
--------------------------------------------------------------------------------
/examples/jamf_pro_server_url/GetJamfProServerUrlSettings/GetJamfProServerUrlSettings.go:
--------------------------------------------------------------------------------
1 | // TODO
2 | package main
3 |
--------------------------------------------------------------------------------
/examples/jamf_pro_server_url/UpdateJamfProServerUrlSettings/UpdateJamfProServerUrlSettings.go:
--------------------------------------------------------------------------------
1 | // TODO
2 | package main
3 |
--------------------------------------------------------------------------------
/examples/jamf_pro_system_initialization/InitializeDatabaseConnection/InitializeDatabaseConnection.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define the database password
21 | databasePassword := "your-secure-database-password"
22 |
23 | // Call InitializeDatabaseConnection function
24 | err = client.InitializeDatabaseConnection(databasePassword)
25 | if err != nil {
26 | log.Fatalf("Error initializing database connection: %v", err)
27 | }
28 |
29 | fmt.Println("Successfully initialized database connection.")
30 | }
31 |
--------------------------------------------------------------------------------
/examples/jamf_pro_version/GetJamfProVersion/GetJamfProVersion.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Call Function
21 | version, err := client.GetJamfProVersion()
22 | if err != nil {
23 | log.Fatalf("Error fetching Jamf Pro version: %v", err)
24 | }
25 |
26 | // Print the fetched Jamf Pro version
27 | fmt.Println("Current Jamf Pro Version:", *version.Version)
28 | }
29 |
--------------------------------------------------------------------------------
/examples/jamf_protect/DeleteJamfProtectIntegration/DeleteJamfProtectIntegration.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/Shared/GitHub/go-api-sdk-jamfpro/localtesting/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Delete the Jamf Protect integration
21 | err = client.DeleteJamfProtectIntegration()
22 | if err != nil {
23 | log.Fatalf("Error deleting Jamf Protect integration: %v", err)
24 | }
25 |
26 | // Print success message
27 | fmt.Println("Successfully deleted Jamf Protect integration")
28 | }
29 |
--------------------------------------------------------------------------------
/examples/ldap_servers/DeleteLDAPServerByID/DeleteLDAPServerByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Delete LDAP server by ID
21 | id := "1" // Replace with actual LDAP server ID
22 | err = client.DeleteLDAPServerByID(id)
23 | if err != nil {
24 | log.Fatalf("Error deleting LDAP server by ID: %v", err)
25 | }
26 |
27 | fmt.Println("LDAP Server deleted successfully")
28 | }
29 |
--------------------------------------------------------------------------------
/examples/ldap_servers/DeleteLDAPServerByName/DeleteLDAPServerByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Delete LDAP server by name
21 | name := "Company Active Directory" // Replace with actual LDAP server name
22 | err = client.DeleteLDAPServerByName(name)
23 | if err != nil {
24 | log.Fatalf("Error deleting LDAP server by name: %v", err)
25 | }
26 |
27 | fmt.Println("LDAP Server deleted successfully")
28 | }
29 |
--------------------------------------------------------------------------------
/examples/ldap_servers/GetLDAPServers/GetLDAPServers.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/xml"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // Call the GetLDAPServers function
22 | ldapServers, err := client.GetLDAPServers()
23 | if err != nil {
24 | log.Fatalf("Error retrieving LDAP servers: %v", err)
25 | }
26 |
27 | // Process and print the response
28 | ldapServersXML, err := xml.MarshalIndent(ldapServers, "", " ") // Indent with 4 spaces
29 | if err != nil {
30 | log.Fatalf("Error marshaling LDAP servers data: %v", err)
31 | }
32 | fmt.Println("Fetched LDAP Servers List:", string(ldapServersXML))
33 | }
34 |
--------------------------------------------------------------------------------
/examples/licensed_software/DeleteLicensedSoftwareByID/DeleteLicensedSoftwareByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "log"
5 |
6 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
7 | )
8 |
9 | func main() {
10 | // Define the path to the JSON configuration file
11 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
12 |
13 | // Initialize the Jamf Pro client with the HTTP client configuration
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | licensedSoftwareID := "1" // Set your ID here
20 |
21 | // Delete licensed software by ID
22 | err = client.DeleteLicensedSoftwareByID(licensedSoftwareID)
23 | if err != nil {
24 | log.Fatalf("Error deleting licensed software by ID: %v", err)
25 | }
26 |
27 | log.Println("Licensed software deleted successfully by ID")
28 | }
29 |
--------------------------------------------------------------------------------
/examples/licensed_software/DeleteLicensedSoftwareByName/DeleteLicensedSoftwareByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "log"
5 |
6 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
7 | )
8 |
9 | func main() {
10 | // Define the path to the JSON configuration file
11 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
12 |
13 | // Initialize the Jamf Pro client with the HTTP client configuration
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | licensedSoftwareName := "Adobe Creative Suite"
20 |
21 | // Delete licensed software by name
22 | err = client.DeleteLicensedSoftwareByName(licensedSoftwareName)
23 | if err != nil {
24 | log.Fatalf("Error deleting licensed software by name: %v", err)
25 | }
26 |
27 | log.Println("Licensed software deleted successfully by name")
28 | }
29 |
--------------------------------------------------------------------------------
/examples/licensed_software/GetLicensedSoftware/GetLicensedSoftware.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/xml"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // Call the GetLicensedSoftware function
22 | licensedSoftware, err := client.GetLicensedSoftware()
23 | if err != nil {
24 | log.Fatalf("Error retrieving licensed software: %v", err)
25 | }
26 |
27 | // Output the result
28 | softwareXML, err := xml.MarshalIndent(licensedSoftware, "", " ")
29 | if err != nil {
30 | log.Fatalf("Error marshaling licensed software data: %v", err)
31 | }
32 | fmt.Println("Licensed Software List:", string(softwareXML))
33 | }
34 |
--------------------------------------------------------------------------------
/examples/locales/GetLocales/GetLocales.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // Call function to get log flushing settings
22 | logFlushingSettings, err := client.GetLocales()
23 | if err != nil {
24 | log.Fatalf("Error fetching locales settings: %v", err)
25 | }
26 |
27 | // Pretty print the JSON
28 | response, err := json.MarshalIndent(logFlushingSettings, "", " ") // Indent with 4 spaces
29 | if err != nil {
30 | log.Fatalf("Error marshaling locales settings data: %v", err)
31 | }
32 | fmt.Println("Fetched locales settings:\n", string(response))
33 | }
34 |
--------------------------------------------------------------------------------
/examples/log_flushing/DeleteLogFlushingTaskByID/DeleteLogFlushingTaskByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Example task ID to delete
21 | taskID := "df705c19-c6ea-44c2-aea1-83bbb20cd85f"
22 |
23 | // Call function to delete log flushing task
24 | err = client.DeleteLogFlushingTaskByID(taskID)
25 | if err != nil {
26 | log.Fatalf("Error deleting log flushing task: %v", err)
27 | }
28 |
29 | fmt.Printf("Successfully deleted log flushing task with ID: %s\n", taskID)
30 | }
31 |
--------------------------------------------------------------------------------
/examples/mac_applications/DeleteMacApplicationByID/DeleteMacApplicationByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define the ID of the VPP mac application you want to delete
21 | profileID := "1"
22 |
23 | // Call the DeleteMacOSConfigurationProfileByID function
24 | err = client.DeleteMacApplicationByID(profileID)
25 | if err != nil {
26 | log.Fatalf("Failed to delete VPP mac application with ID %d: %v", profileID, err)
27 | }
28 |
29 | fmt.Printf("VPP mac application with ID %d deleted successfully\n", profileID)
30 | }
31 |
--------------------------------------------------------------------------------
/examples/mac_applications/GetMacApplications/GetMacApplications.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/xml"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | macApps, err := client.GetMacApplications()
22 | if err != nil {
23 | log.Fatalf("Error fetching Mac Applications: %v", err)
24 | }
25 |
26 | // Pretty print the account details
27 | byoprofileXML, err := xml.MarshalIndent(macApps, "", " ") // Indent with 4 spaces
28 | if err != nil {
29 | log.Fatalf("Error marshaling account data: %v", err)
30 | }
31 | fmt.Println("Fetched mac applications Details:", string(byoprofileXML))
32 | }
33 |
--------------------------------------------------------------------------------
/examples/macos_configuration_profiles/DeleteMacOSConfigurationProfileByID/DeleteMacOSConfigurationProfileByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define the ID of the macOS Configuration Profile you want to delete
21 | profileID := "1"
22 |
23 | // Call the DeleteMacOSConfigurationProfileByID function
24 | err = client.DeleteMacOSConfigurationProfileByID(profileID)
25 | if err != nil {
26 | log.Fatalf("Failed to delete macOS Configuration Profile with ID %d: %v", profileID, err)
27 | }
28 |
29 | fmt.Printf("Profile with ID %d deleted successfully\n", profileID)
30 | }
31 |
--------------------------------------------------------------------------------
/examples/mobile_device_applications/DeleteMobileDeviceApplicationpByID/DeleteMobileDeviceApplicationpByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define the ID of the mobile device application you want to delete
21 | appID := "1" // Replace with the actual ID of the application you want to delete
22 |
23 | // Perform the deletion
24 | err = client.DeleteMobileDeviceApplicationpByID(appID)
25 | if err != nil {
26 | fmt.Println("Error deleting mobile device application:", err)
27 | } else {
28 | fmt.Println("Mobile Device Application deleted successfully")
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/examples/mobile_device_applications/GetMobileDeviceApplicationByAppBundleID/GetMobileDeviceApplicationByAppBundleID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Replace "YourBundleID" with an actual bundle ID
21 | bundleID := "YourBundleID"
22 |
23 | appByBundleID, err := client.GetMobileDeviceApplicationByAppBundleID(bundleID)
24 | if err != nil {
25 | fmt.Println("Error fetching application by Bundle ID:", err)
26 | } else {
27 | fmt.Println("Fetched Application by Bundle ID:", appByBundleID)
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/examples/mobile_device_applications/GetMobileDeviceApplicationByAppBundleIDAndVersion/GetMobileDeviceApplicationByAppBundleIDAndVersion.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Replace these with actual bundle ID and version
21 | bundleID := "YourBundleID"
22 | version := "YourVersion"
23 |
24 | app, err := client.GetMobileDeviceApplicationByAppBundleIDAndVersion(bundleID, version)
25 | if err != nil {
26 | fmt.Println("Error fetching application by Bundle ID and Version:", err)
27 | } else {
28 | fmt.Println("Fetched Application by Bundle ID and Version:", app)
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/examples/mobile_device_applications/GetMobileDeviceApplicationByNameAndDataSubset/GetMobileDeviceApplicationByNameAndDataSubset.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Replace these with actual name and subset
21 | name := "YourAppName"
22 | subset := "YourSubset"
23 |
24 | app, err := client.GetMobileDeviceApplicationByNameAndDataSubset(name, subset)
25 | if err != nil {
26 | fmt.Println("Error fetching application by Name and Data Subset:", err)
27 | } else {
28 | fmt.Println("Fetched Application by Name and Data Subset:", app)
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/examples/mobile_device_configuration_profiles/DeleteMobileDeviceConfigurationProfileByID/DeleteMobileDeviceConfigurationProfileByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Delete profile by ID
21 | if err := client.DeleteMobileDeviceConfigurationProfileByID("2"); err != nil {
22 | fmt.Println("Error deleting profile by ID:", err)
23 | } else {
24 | fmt.Println("Profile deleted successfully by ID")
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/examples/mobile_device_configuration_profiles/DeleteMobileDeviceConfigurationProfileByName/DeleteMobileDeviceConfigurationProfileByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Delete profile by Name
21 | if err := client.DeleteMobileDeviceConfigurationProfileByName("WiFi"); err != nil {
22 | fmt.Println("Error deleting profile by Name:", err)
23 | } else {
24 | fmt.Println("Profile deleted successfully by Name")
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/mobile_device_configuration_profiles/GetMobileDeviceConfigurationProfileByIDWithSubset/GetMobileDeviceConfigurationProfileByIDWithSubset.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | profileID := "1" // Replace with the actual ID
21 | subset := "desired_subset" // Replace with the desired subset
22 | profile, err := client.GetMobileDeviceConfigurationProfileByIDWithSubset(profileID, subset)
23 | if err != nil {
24 | log.Fatalf("Error fetching mobile device configuration profile by ID and subset: %v", err)
25 | }
26 |
27 | fmt.Printf("Profile: %+v\n", profile)
28 | }
29 |
--------------------------------------------------------------------------------
/examples/mobile_device_configuration_profiles/GetMobileDeviceConfigurationProfileByName/GetMobileDeviceConfigurationProfileByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | profileName := "Corporate Wireless" // Replace with the actual profile name
21 | profile, err := client.GetMobileDeviceConfigurationProfileByName(profileName)
22 | if err != nil {
23 | log.Fatalf("Error fetching mobile device configuration profile by name: %v", err)
24 | }
25 |
26 | fmt.Printf("Profile: %+v\n", profile)
27 | }
28 |
--------------------------------------------------------------------------------
/examples/mobile_device_enrollment_groups/DeleteMobileDeviceGroupByID/DeleteMobileDeviceGroupByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "log"
5 |
6 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
7 | )
8 |
9 | func main() {
10 | // Define the path to the JSON configuration file
11 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
12 |
13 | // Initialize the Jamf Pro client with the HTTP client configuration
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | // Define the ID of the group you want to delete
20 | groupID := "1" // Replace with the actual group ID
21 |
22 | // Call the DeleteMobileDeviceGroupByID function
23 | err = client.DeleteMobileDeviceGroupByID(groupID)
24 | if err != nil {
25 | log.Fatalf("Error deleting mobile device group: %s\n", err)
26 | }
27 |
28 | log.Println("Mobile device group deleted successfully")
29 | }
30 |
--------------------------------------------------------------------------------
/examples/mobile_device_enrollment_groups/DeleteMobileDeviceGroupByName/DeleteMobileDeviceGroupByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "log"
5 |
6 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
7 | )
8 |
9 | func main() {
10 | // Define the path to the JSON configuration file
11 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
12 |
13 | // Initialize the Jamf Pro client with the HTTP client configuration
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | // Define the name of the group you want to delete
20 | groupName := "Sample Smart Group" // Replace with the actual group name
21 |
22 | // Call the DeleteMobileDeviceGroupByName function
23 | err = client.DeleteMobileDeviceGroupByName(groupName)
24 | if err != nil {
25 | log.Fatalf("Error deleting mobile device group: %s\n", err)
26 | }
27 |
28 | log.Println("Mobile device group deleted successfully")
29 | }
30 |
--------------------------------------------------------------------------------
/examples/mobile_device_enrollment_profiles/DeleteMobileDeviceEnrollmentProfileByID/DeleteMobileDeviceEnrollmentProfileByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | profileID := "1" // Replace with actual ID
21 |
22 | err = client.DeleteMobileDeviceEnrollmentProfileByID(profileID)
23 | if err != nil {
24 | log.Fatalf("Error deleting profile by name: %v", err)
25 | }
26 |
27 | fmt.Println("Profile deleted successfully.")
28 | }
29 |
--------------------------------------------------------------------------------
/examples/mobile_device_enrollment_profiles/DeleteMobileDeviceEnrollmentProfileByInvitation/DeleteMobileDeviceEnrollmentProfileByInvitation.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | invitation := "YourInvitationCode" // Replace with actual invitation name
21 |
22 | err = client.DeleteMobileDeviceEnrollmentProfileByInvitation(invitation)
23 | if err != nil {
24 | log.Fatalf("Error deleting profile by name: %v", err)
25 | }
26 |
27 | fmt.Println("Profile deleted successfully.")
28 | }
29 |
--------------------------------------------------------------------------------
/examples/mobile_device_enrollment_profiles/DeleteMobileDeviceEnrollmentProfileByName/DeleteMobileDeviceEnrollmentProfileByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | profileName := "Configurator Enrollment Profile" // Replace with actual name
21 |
22 | err = client.DeleteMobileDeviceEnrollmentProfileByName(profileName)
23 | if err != nil {
24 | log.Fatalf("Error deleting profile by name: %v", err)
25 | }
26 |
27 | fmt.Println("Profile deleted successfully.")
28 | }
29 |
--------------------------------------------------------------------------------
/examples/mobile_device_enrollment_profiles/GetMobileDeviceEnrollmentProfileByIDWithSubset/GetMobileDeviceEnrollmentProfileByIDWithSubset.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | profileID := "1" // Replace with the actual profile ID
21 | subset := "general" // Replace with the actual subset (e.g., "general")
22 |
23 | profile, err := client.GetMobileDeviceEnrollmentProfileByIDWithSubset(profileID, subset)
24 | if err != nil {
25 | fmt.Println("Error fetching profile by name and subset:", err)
26 | return
27 | }
28 |
29 | fmt.Printf("Profile: %+v\n", profile)
30 | }
31 |
--------------------------------------------------------------------------------
/examples/mobile_device_enrollment_profiles/GetMobileDeviceEnrollmentProfileByNameWithSubset/GetMobileDeviceEnrollmentProfileByNameWithSubset.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | name := "ProfileName" // Replace with the actual profile name
21 | subset := "general" // Replace with the actual subset (e.g., "general")
22 |
23 | profile, err := client.GetMobileDeviceEnrollmentProfileByNameWithSubset(name, subset)
24 | if err != nil {
25 | fmt.Println("Error fetching profile by name and subset:", err)
26 | return
27 | }
28 |
29 | fmt.Printf("Profile: %+v\n", profile)
30 | }
31 |
--------------------------------------------------------------------------------
/examples/mobile_device_prestages/DeleteMobileDevicePrestageByID/DeleteMobileDevicePrestageByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/neilmartin/GitHub/go-api-sdk-jamfpro/client_auth.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // The ID of the mobile device prestage you want to delete
21 | prestageID := "12"
22 |
23 | // Call DeleteMobileDevicePrestageByID to delete the prestage
24 | err = client.DeleteMobileDevicePrestageByID(prestageID)
25 | if err != nil {
26 | log.Fatalf("Error deleting mobile device prestage: %v", err)
27 | }
28 |
29 | // Print a confirmation message
30 | fmt.Println("Mobile device prestage deleted successfully.")
31 | }
32 |
--------------------------------------------------------------------------------
/examples/mobile_device_provisioning_profiles/DeleteMobileDeviceProvisioningProfileByID/DeleteMobileDeviceProvisioningProfileByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | profileID := "1" // Replace with the actual ID to delete
21 |
22 | err = client.DeleteMobileDeviceProvisioningProfileByID(profileID)
23 | if err != nil {
24 | log.Fatalf("Error deleting mobile device provisioning profile by ID: %v", err)
25 | }
26 |
27 | fmt.Printf("Mobile Device Provisioning Profile with ID %d deleted successfully\n", profileID)
28 | }
29 |
--------------------------------------------------------------------------------
/examples/mobile_device_provisioning_profiles/DeleteMobileDeviceProvisioningProfileByName/DeleteMobileDeviceProvisioningProfileByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | profileName := "ProfileName" // Replace with the actual name of the profile to delete
21 |
22 | err = client.DeleteMobileDeviceProvisioningProfileByName(profileName)
23 | if err != nil {
24 | log.Fatalf("Error deleting mobile device provisioning profile by name: %v", err)
25 | }
26 |
27 | fmt.Printf("Mobile Device Provisioning Profile with name '%s' deleted successfully\n", profileName)
28 | }
29 |
--------------------------------------------------------------------------------
/examples/mobile_device_provisioning_profiles/DeleteMobileDeviceProvisioningProfileByUUID/DeleteMobileDeviceProvisioningProfileByUUID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | profileUUID := "116AF1E6-7EB5-4335-B598-276CDE5E015B" // Replace with the actual UUID of the profile to delete
21 |
22 | err = client.DeleteMobileDeviceProvisioningProfileByUUID(profileUUID)
23 | if err != nil {
24 | log.Fatalf("Error deleting mobile device provisioning profile by UUID: %v", err)
25 | }
26 |
27 | fmt.Printf("Mobile Device Provisioning Profile with UUID '%s' deleted successfully\n", profileUUID)
28 | }
29 |
--------------------------------------------------------------------------------
/examples/mobile_devices/DeleteMobileDeviceByID/DeleteMobileDeviceByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "log"
5 |
6 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
7 | )
8 |
9 | func main() {
10 | // Define the path to the JSON configuration file
11 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
12 |
13 | // Initialize the Jamf Pro client with the HTTP client configuration
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | // Example device ID to delete
20 | deviceID := "1" // Replace with an actual device ID
21 |
22 | // Delete mobile device by ID
23 | err = client.DeleteMobileDeviceByID(deviceID)
24 | if err != nil {
25 | log.Fatalf("Error deleting mobile device by ID: %v", err)
26 | } else {
27 | log.Printf("Mobile device with ID %d has been successfully deleted.\n", deviceID)
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/examples/mobile_devices/DeleteMobileDeviceByName/DeleteMobileDeviceByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "log"
5 |
6 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
7 | )
8 |
9 | func main() {
10 | // Define the path to the JSON configuration file
11 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
12 |
13 | // Initialize the Jamf Pro client with the HTTP client configuration
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | // Example device Name to delete
20 | deviceName := "iPad" // Replace with an actual device Name
21 |
22 | // Delete mobile device by Name
23 | err = client.DeleteMobileDeviceByName(deviceName)
24 | if err != nil {
25 | log.Fatalf("Error deleting mobile device by Name: %v", err)
26 | } else {
27 | log.Printf("Mobile device with Name %s has been successfully deleted.\n", deviceName)
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/examples/mobile_devices/GetMobileDevices/GetMobileDevices.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/xml"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // Fetch mobile devices
22 | mobileDevices, err := client.GetMobileDevices()
23 | if err != nil {
24 | log.Fatalf("Error fetching mobile devices: %s\n", err)
25 | }
26 |
27 | // Print the mobile devices in a formatted XML
28 | mobileDevicesXML, err := xml.MarshalIndent(mobileDevices, "", " ")
29 | if err != nil {
30 | log.Fatalf("Error marshaling mobile devices data: %v", err)
31 | }
32 | fmt.Println("Mobile Devices:\n", string(mobileDevicesXML))
33 | }
34 |
--------------------------------------------------------------------------------
/examples/mobile_extension_attributes/DeleteMobileExtensionAttributeByID/DeleteMobileExtensionAttributeByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "log"
5 |
6 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
7 | )
8 |
9 | func main() {
10 | // Define the path to the JSON configuration file
11 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
12 |
13 | // Initialize the Jamf Pro client with the HTTP client configuration
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | // ID of the mobile extension attribute to delete
20 | id := "1" // Replace with the actual ID
21 |
22 | if err := client.DeleteMobileExtensionAttributeByID(id); err != nil {
23 | log.Fatalf("Error deleting mobile extension attribute by ID: %v", err)
24 | }
25 |
26 | log.Println("Mobile extension attribute deleted successfully.")
27 | }
28 |
--------------------------------------------------------------------------------
/examples/mobile_extension_attributes/DeleteMobileExtensionAttributeByName/DeleteMobileExtensionAttributeByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "log"
5 |
6 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
7 | )
8 |
9 | func main() {
10 | // Define the path to the JSON configuration file
11 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
12 |
13 | // Initialize the Jamf Pro client with the HTTP client configuration
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | // Name of the mobile extension attribute to delete
20 | name := "New Attribute" // Replace with the actual name
21 |
22 | if err := client.DeleteMobileExtensionAttributeByName(name); err != nil {
23 | log.Fatalf("Error deleting mobile extension attribute by name: %v", err)
24 | }
25 |
26 | log.Println("Mobile extension attribute deleted successfully.")
27 | }
28 |
--------------------------------------------------------------------------------
/examples/network_segments/DeleteNetworkSegmentByID/DeleteNetworkSegmentByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | segmentID := "1" // Replace with actual ID of the network segment to delete
21 |
22 | err = client.DeleteNetworkSegmentByID(segmentID)
23 | if err != nil {
24 | log.Fatalf("Error deleting network segment by ID: %v", err)
25 | } else {
26 | fmt.Printf("Network segment with ID %d successfully deleted.\n", segmentID)
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/examples/network_segments/DeleteNetworkSegmentByName/DeleteNetworkSegmentByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | segmentName := "NY Office" // Replace with the actual name of the network segment to delete
21 |
22 | err = client.DeleteNetworkSegmentByName(segmentName)
23 | if err != nil {
24 | log.Fatalf("Error deleting network segment by name: %v", err)
25 | } else {
26 | fmt.Printf("Network segment '%s' successfully deleted.\n", segmentName)
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/examples/network_segments/GetNetworkSegments/GetNetworkSegments.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/xml"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | segments, err := client.GetNetworkSegments()
22 | if err != nil {
23 | fmt.Println("Error fetching network segments:", err)
24 | return
25 | }
26 |
27 | // Pretty print the network segments in XML
28 | segmentsXML, err := xml.MarshalIndent(segments, "", " ") // Indent with 4 spaces
29 | if err != nil {
30 | log.Fatalf("Error marshaling network segments data: %v", err)
31 | }
32 | fmt.Println("Network Segments:\n", string(segmentsXML))
33 | }
34 |
--------------------------------------------------------------------------------
/examples/oidc/GenerateKeystoreForOIDCMessages/GenerateKeystoreForOIDCMessages.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Generate a new OIDC keystore
21 | err = client.GenerateKeystoreForOIDCMessages()
22 | if err != nil {
23 | log.Fatalf("Error generating OIDC keystore: %v", err)
24 | }
25 |
26 | fmt.Println("Successfully generated a new OIDC keystore.")
27 | }
28 |
--------------------------------------------------------------------------------
/examples/packages/DeleteMultiplePackagesByID/DeleteMultiplePackagesByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define the package IDs to be deleted
21 | packageIDs := []string{"267", "264"}
22 |
23 | err = client.DeleteMultiplePackagesByID(packageIDs)
24 | if err != nil {
25 | log.Fatalf("Error deleting multiple packages by IDs: %v", err)
26 | } else {
27 | fmt.Printf("Packages with IDs %v successfully deleted.\n", packageIDs)
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/examples/packages/DeletePackageManifestByID/DeletePackageManifestByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define the package ID to be deleted
21 | packageID := "250"
22 |
23 | err = client.DeletePackageManifestByID(packageID)
24 | if err != nil {
25 | log.Fatalf("Error deleting packages by IDs: %v", err)
26 | } else {
27 | fmt.Printf("Package manfest with ID %v successfully deleted.\n", packageID)
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/examples/packages/DeletePackagesByID/DeletePackageByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define the package ID to be deleted
21 | packageID := "256"
22 |
23 | err = client.DeletePackageByID(packageID)
24 | if err != nil {
25 | log.Fatalf("Error deleting packages by IDs: %v", err)
26 | } else {
27 | fmt.Printf("Package with ID %v successfully deleted.\n", packageID)
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/examples/packages/GetPackageByName/GetPackageByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | packageName := "Firefox 133.0.3.pkg"
20 |
21 | response, err := client.GetPackageByName(packageName)
22 | if err != nil {
23 | fmt.Println("Error fetching package by name:", err)
24 | return
25 | }
26 |
27 | packageJSON, err := json.MarshalIndent(response, "", " ")
28 | if err != nil {
29 | log.Fatalf("Error marshaling package data: %v", err)
30 | }
31 | fmt.Println("Obtained package Details:\n", string(packageJSON))
32 | }
33 |
--------------------------------------------------------------------------------
/examples/patch_management/AcceptPatchManagementDisclaimer/AcceptPatchManagementDisclaimer.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | err = client.AcceptPatchManagementDisclaimer()
21 | if err != nil {
22 | log.Fatalf("Error accepting patch management disclaimer: %v", err)
23 | }
24 |
25 | fmt.Println("Successfully accepted patch management disclaimer")
26 | }
27 |
--------------------------------------------------------------------------------
/examples/patch_management_external_sources/DeleteExternalPatchSourceByID/DeleteExternalPatchSourceByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Specify the ID to delete
21 | sourceID := "3"
22 |
23 | // Delete the patch external source
24 | err = client.DeleteExternalPatchSourceByID(sourceID)
25 | if err != nil {
26 | log.Fatalf("Error deleting patch external source: %v", err)
27 | }
28 |
29 | fmt.Printf("Successfully deleted patch external source with ID: %s\n", sourceID)
30 | }
31 |
--------------------------------------------------------------------------------
/examples/patch_management_external_sources/GetPatchExternalSources/GetPatchExternalSources.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // Get all patch external sources
22 | sources, err := client.GetPatchExternalSources()
23 | if err != nil {
24 | log.Fatalf("Error fetching patch external sources: %v", err)
25 | }
26 |
27 | // Pretty print the sources
28 | resp, err := json.MarshalIndent(sources, "", " ")
29 | if err != nil {
30 | log.Fatalf("Error marshaling sources data: %v", err)
31 | }
32 | fmt.Printf("Patch External Sources:\n%s\n", string(resp))
33 | }
34 |
--------------------------------------------------------------------------------
/examples/patch_policies/AddPatchPolicyToDashboard/AddPatchPolicyToDashboard.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Specify the patch policy ID to add to the dashboard
21 | policyID := "5"
22 |
23 | // Add the patch policy to the dashboard
24 | err = client.AddPatchPolicyToDashboard(policyID)
25 | if err != nil {
26 | log.Fatalf("Error adding patch policy to dashboard: %v", err)
27 | }
28 |
29 | fmt.Printf("Successfully added patch policy ID %s to the dashboard\n", policyID)
30 | }
31 |
--------------------------------------------------------------------------------
/examples/patch_policies/DeletePatchPolicyByID/DeletePatchPolicyByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Example patch policy ID to delete
21 | policyID := "1"
22 |
23 | // Delete the patch policy
24 | err = client.DeletePatchPolicyByID(policyID)
25 | if err != nil {
26 | log.Fatalf("Error deleting patch policy: %v", err)
27 | }
28 |
29 | fmt.Printf("Successfully deleted patch policy with ID: %s\n", policyID)
30 | }
31 |
--------------------------------------------------------------------------------
/examples/patch_policies/DeletePatchPolicyFromDashboard/DeletePatchPolicyFromDashboard.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Specify the patch policy ID to remove from the dashboard
21 | policyID := "5"
22 |
23 | // Remove the patch policy from the dashboard
24 | err = client.DeletePatchPolicyFromDashboard(policyID)
25 | if err != nil {
26 | log.Fatalf("Error removing patch policy from dashboard: %v", err)
27 | }
28 |
29 | fmt.Printf("Successfully removed patch policy ID %s from the dashboard\n", policyID)
30 | }
31 |
--------------------------------------------------------------------------------
/examples/patch_software_title_configurations/DeletePatchSoftwareTitleConfigurationById/DeletePatchSoftwareTitleConfigurationById.go:
--------------------------------------------------------------------------------
1 | // TODO
2 |
3 | package main
4 |
--------------------------------------------------------------------------------
/examples/patch_software_title_configurations/GetPatchSoftwareTitleConfigurations/GetPatchSoftwareTitleConfigurations.go:
--------------------------------------------------------------------------------
1 | // TODO
2 |
3 | package main
4 |
--------------------------------------------------------------------------------
/examples/policies/DeletePolicyByID/DeletePolicyByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define the policy ID to be deleted
21 | policyID := "1" // Replace with the actual policy ID
22 |
23 | // Delete the policy by ID
24 | err = client.DeletePolicyByID(policyID) // Changed here from := to =
25 | if err != nil {
26 | log.Fatalf("Error deleting policy: %v", err)
27 | }
28 |
29 | fmt.Println("Policy deleted successfully.")
30 | }
31 |
--------------------------------------------------------------------------------
/examples/policies/DeletePolicyByName/DeletePolicyByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define the policy name to be deleted
21 | policyName := "PolicyName" // Replace with the actual policy name
22 |
23 | // Delete the policy by name
24 | err = client.DeletePolicyByName(policyName) // Changed here from := to =
25 | if err != nil {
26 | log.Fatalf("Error deleting policy: %v", err)
27 | }
28 |
29 | fmt.Println("Policy deleted successfully.")
30 | }
31 |
--------------------------------------------------------------------------------
/examples/policies/GetPolicies/GetPolicies.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/xml"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | policies, err := client.GetPolicies()
22 | if err != nil {
23 | log.Fatalf("Error fetching policies: %v", err)
24 | }
25 |
26 | policyXML, err := xml.MarshalIndent(policies, "", " ")
27 | if err != nil {
28 | log.Fatalf("Error marshaling policy details data: %v", err)
29 | }
30 | fmt.Println("Created Policy Details:\n", string(policyXML))
31 | }
32 |
--------------------------------------------------------------------------------
/examples/policy_properties/GetPolicyProperties/GetPolicyProperties.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | clientChecinInfo, err := client.GetPolicyProperties()
22 | if err != nil {
23 | log.Fatalf("Failed to get client checkin policy info, %v", err)
24 | }
25 |
26 | checkinInfoJson, err := json.MarshalIndent(clientChecinInfo, "", " ")
27 | if err != nil {
28 | log.Fatalf("Failed to marshal json, %v", err)
29 | }
30 |
31 | fmt.Println(string(checkinInfoJson))
32 | }
33 |
--------------------------------------------------------------------------------
/examples/printers/DeletePrinterByID/DeletePrinterByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | id := "1" // Replace with the actual printer ID
21 |
22 | err = client.DeletePrinterByID(id)
23 | if err != nil {
24 | fmt.Println("Error deleting printer:", err)
25 | return
26 | }
27 |
28 | fmt.Println("Printer deleted successfully")
29 | }
30 |
--------------------------------------------------------------------------------
/examples/printers/DeletePrinterByName/DeletePrinterByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | name := "HP 9th Floor" // Replace with the actual printer name
21 |
22 | err = client.DeletePrinterByName(name)
23 | if err != nil {
24 | fmt.Println("Error deleting printer:", err)
25 | return
26 | }
27 |
28 | fmt.Println("Printer deleted successfully")
29 | }
30 |
--------------------------------------------------------------------------------
/examples/printers/GetPrinters/GetPrinters.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/xml"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | printers, err := client.GetPrinters()
22 | if err != nil {
23 | fmt.Println("Error fetching printers:", err)
24 | return
25 | }
26 |
27 | // Pretty print the created script details in XML
28 | createdPrintersXML, err := xml.MarshalIndent(printers, "", " ") // Indent with 4 spaces
29 | if err != nil {
30 | log.Fatalf("Error marshaling created script data: %v", err)
31 | }
32 | fmt.Println("Created Script Details:\n", string(createdPrintersXML))
33 | }
34 |
--------------------------------------------------------------------------------
/examples/removeable_mac_addresses/DeleteRemovableMACAddressByID/DeleteRemovableMACAddressByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | macAddressID := "1" // Replace with the actual MAC address ID
21 |
22 | err = client.DeleteRemovableMACAddressByID(macAddressID)
23 | if err != nil {
24 | fmt.Println("Error:", err)
25 | return
26 | }
27 |
28 | fmt.Println("MAC Address successfully deleted.")
29 | }
30 |
--------------------------------------------------------------------------------
/examples/removeable_mac_addresses/DeleteRemovableMACAddressByName/DeleteRemovableMACAddressByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | macAddressName := "name_of_mac_address" // Replace with the actual MAC address name
21 |
22 | err = client.DeleteRemovableMACAddressByName(macAddressName)
23 | if err != nil {
24 | fmt.Println("Error:", err)
25 | return
26 | }
27 |
28 | fmt.Println("MAC Address successfully deleted.")
29 | }
30 |
--------------------------------------------------------------------------------
/examples/restricted_software/DeleteRestrictedSoftwareByID/DeleteRestrictedSoftwareByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | restrictedSoftwareID := "1" // Replace with the actual ID
21 |
22 | err = client.DeleteRestrictedSoftwareByID(restrictedSoftwareID)
23 | if err != nil {
24 | fmt.Println("Error:", err)
25 | return
26 | }
27 |
28 | fmt.Println("Restricted software deleted successfully.")
29 | }
30 |
--------------------------------------------------------------------------------
/examples/restricted_software/DeleteRestrictedSoftwareByName/DeleteRestrictedSoftwareByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | restrictedSoftwareName := "Software Name" // Replace with the actual name
21 |
22 | err = client.DeleteRestrictedSoftwareByName(restrictedSoftwareName)
23 | if err != nil {
24 | fmt.Println("Error:", err)
25 | return
26 | }
27 |
28 | fmt.Println("Restricted software deleted successfully.")
29 | }
30 |
--------------------------------------------------------------------------------
/examples/scripts/DeleteScriptByID/DeleteScriptByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | scriptIDToDelete := "3855" // Replace with the ID of the script you want to delete
21 |
22 | err = client.DeleteScriptByID(scriptIDToDelete)
23 | if err != nil {
24 | log.Fatalf("Error deleting script by ID: %v", err)
25 | }
26 |
27 | fmt.Println("Script deleted successfully!")
28 | }
29 |
--------------------------------------------------------------------------------
/examples/scripts/DeleteScriptByName/DeleteScriptByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | scriptNameToDelete := "Script Name" // Replace with the actual script name
21 |
22 | err = client.DeleteScriptByName(scriptNameToDelete)
23 | if err != nil {
24 | log.Fatalf("Error deleting script by name: %v", err)
25 | }
26 |
27 | fmt.Printf("Script with name '%s' was successfully deleted.\n", scriptNameToDelete)
28 | }
29 |
--------------------------------------------------------------------------------
/examples/self_service/UploadSelfServiceBrandingImage/self_service.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deploymenttheory/go-api-sdk-jamfpro/ba55cb4a3121bdb0f6a1bc18f3572e547644bbef/examples/self_service/UploadSelfServiceBrandingImage/self_service.png
--------------------------------------------------------------------------------
/examples/self_service_branding_macos/DeleteSelfServiceBrandingMacOSByID/DeleteSelfServiceBrandingMacOSByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 | "os"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // Assume we have an ID for the branding we want to delete
22 | brandingID := "2" // Replace with your actual branding ID
23 |
24 | // Call the delete function with the ID
25 | err = client.DeleteSelfServiceBrandingMacOSByID(brandingID)
26 | if err != nil {
27 | fmt.Fprintf(os.Stderr, "Error deleting self-service branding: %v\n", err)
28 | os.Exit(1)
29 | }
30 |
31 | fmt.Println("Self Service Branding deleted successfully")
32 | }
33 |
--------------------------------------------------------------------------------
/examples/sites/CreateSite/CreateSite.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define the site to be created
21 | newSite := &jamfpro.SharedResourceSite{
22 | Name: "NewSiteName", // Replace "NewSiteName" with the actual name for the new site
23 | }
24 |
25 | // Create the site
26 | createdSite, err := client.CreateSite(newSite)
27 | if err != nil {
28 | log.Fatalf("Error creating site: %v", err)
29 | }
30 |
31 | fmt.Printf("Site created successfully. ID: %d, Name: %s\n", createdSite.ID, createdSite.Name)
32 | }
33 |
--------------------------------------------------------------------------------
/examples/sites/DeleteSiteByID/DeleteSiteByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 | "strconv"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | siteIDToDelete := 1 // Replace 1 with the actual site ID
22 |
23 | err = client.DeleteSiteByID(strconv.Itoa(siteIDToDelete))
24 | if err != nil {
25 | log.Fatalf("Error deleting site by ID: %v", err)
26 | }
27 |
28 | fmt.Printf("Site with ID %d deleted successfully.\n", siteIDToDelete)
29 | }
30 |
--------------------------------------------------------------------------------
/examples/sites/DeleteSiteByName/DeleteSiteByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | siteNameToDelete := "Site Name" // Replace with the actual site name
21 |
22 | err = client.DeleteSiteByName(siteNameToDelete)
23 | if err != nil {
24 | log.Fatalf("Error deleting site by name: %v", err)
25 | }
26 |
27 | fmt.Printf("Site with name '%s' deleted successfully.\n", siteNameToDelete)
28 | }
29 |
--------------------------------------------------------------------------------
/examples/sites/GetSiteByID/GetSiteByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | siteID := "1" // Replace 1 with the actual site ID
21 |
22 | // Fetch the site by ID
23 | site, err := client.GetSiteByID(siteID)
24 | if err != nil {
25 | log.Fatalf("Error fetching site by ID: %v", err)
26 | }
27 |
28 | fmt.Printf("Site ID: %d, Name: %s\n", site.ID, site.Name)
29 | }
30 |
--------------------------------------------------------------------------------
/examples/sites/GetSiteByName/GetSiteByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | siteName := "Site Name" // Replace with the actual site name
21 |
22 | // Fetch the site by name
23 | site, err := client.GetSiteByName(siteName)
24 | if err != nil {
25 | log.Fatalf("Error fetching site by name: %v", err)
26 | }
27 |
28 | fmt.Printf("Site ID: %d, Name: %s\n", site.ID, site.Name)
29 | }
30 |
--------------------------------------------------------------------------------
/examples/sites/GetSites/GetSites.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Fetch all sites
21 | sites, err := client.GetSites()
22 | if err != nil {
23 | log.Fatalf("Error fetching sites: %v", err)
24 | }
25 |
26 | fmt.Println("Sites:")
27 | for _, site := range sites.Site {
28 | fmt.Printf("ID: %d, Name: %s\n", site.ID, site.Name)
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/examples/smart_computer_groups/DeleteComputerGroupByID/DeleteComputerGroupByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define group ID to delete
21 | groupID := "1"
22 |
23 | // Call function
24 | err = client.DeleteSmartComputerGroupByID(groupID)
25 | if err != nil {
26 | log.Fatalf("Error deleting smart computer group: %v", err)
27 | }
28 |
29 | fmt.Printf("Successfully deleted smart computer group with ID %s\n", groupID)
30 | }
31 |
--------------------------------------------------------------------------------
/examples/software_update_servers/DeleteSoftwareUpdateServerByID/DeleteSoftwareUpdateServerByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // ID of the software update server to delete
21 | serverID := "1"
22 |
23 | // Call DeleteSoftwareUpdateServerByID
24 | err = client.DeleteSoftwareUpdateServerByID(serverID)
25 | if err != nil {
26 | log.Fatalf("Error deleting software update server by ID: %v", err)
27 | }
28 |
29 | fmt.Printf("Successfully deleted software update server with ID %d\n", serverID)
30 | }
31 |
--------------------------------------------------------------------------------
/examples/software_update_servers/DeleteSoftwareUpdateServerByName/DeleteSoftwareUpdateServerByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Name of the software update server to delete
21 | serverName := "New York SUS"
22 |
23 | // Call DeleteSoftwareUpdateServerByName
24 | err = client.DeleteSoftwareUpdateServerByName(serverName)
25 | if err != nil {
26 | log.Fatalf("Error deleting software update server by name: %v", err)
27 | }
28 |
29 | fmt.Printf("Successfully deleted software update server with name %s\n", serverName)
30 | }
31 |
--------------------------------------------------------------------------------
/examples/sso_certificate/DeleteSSOCertificate/DeleteSSOCertificate.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/Shared/GitHub/go-api-sdk-jamfpro/localtesting/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Delete the SSO certificate
21 | err = client.DeleteSSOCertificate()
22 | if err != nil {
23 | log.Fatalf("Error deleting SSO certificate: %v", err)
24 | }
25 |
26 | fmt.Println("SSO certificate successfully deleted")
27 | }
28 |
--------------------------------------------------------------------------------
/examples/sso_failover/GetSSOFailoverURL/GetSSOFailoverURL.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Fetch SSO failover settings
21 | failoverSettings, err := client.GetSSOFailoverSettings()
22 | if err != nil {
23 | log.Fatalf("Error fetching SSO failover settings: %v", err)
24 | }
25 |
26 | fmt.Printf("Failover URL: %s\n", failoverSettings.FailoverURL)
27 | fmt.Printf("Generation Time: %d\n", failoverSettings.GenerationTime)
28 | }
29 |
--------------------------------------------------------------------------------
/examples/sso_failover/UpdateSSOFailoverURL/UpdateSSOFailoverURL.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Update the SSO failover URL
21 | updatedFailoverSettings, err := client.UpdateFailoverUrl()
22 | if err != nil {
23 | log.Fatalf("Error updating SSO failover URL: %v", err)
24 | }
25 |
26 | fmt.Println("Updated SSO Failover URL:", updatedFailoverSettings.FailoverURL)
27 | fmt.Println("New Generation Time:", updatedFailoverSettings.GenerationTime)
28 | }
29 |
--------------------------------------------------------------------------------
/examples/startup_status/GetStartupStatus/GetStartupStatus.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // Call GetStartupStatus function
22 | startupStatus, err := client.GetStartupStatus()
23 | if err != nil {
24 | log.Fatalf("Error fetching startup status: %v", err)
25 | }
26 |
27 | // Pretty print the startup status in JSON
28 | JSON, err := json.MarshalIndent(startupStatus, "", " ") // Indent with 4 spaces
29 | if err != nil {
30 | log.Fatalf("Error marshaling startup status data: %v", err)
31 | }
32 | fmt.Println("Jamf Pro Startup Status:\n", string(JSON))
33 | }
34 |
--------------------------------------------------------------------------------
/examples/support_files/computer_extensioin_attribute.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ########## variable-ing ##########
4 |
5 |
6 |
7 | loggedInUser=$(/usr/bin/stat -f%Su "/dev/console")
8 |
9 |
10 |
11 | ########## main process ##########
12 |
13 |
14 |
15 | # Report logged-in user.
16 | echo "$loggedInUser"
17 |
18 |
19 |
20 | exit 0
--------------------------------------------------------------------------------
/examples/support_files/ebooks_pdf/Apple-Developer-Program-License-Agreement-20230828-English.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deploymenttheory/go-api-sdk-jamfpro/ba55cb4a3121bdb0f6a1bc18f3572e547644bbef/examples/support_files/ebooks_pdf/Apple-Developer-Program-License-Agreement-20230828-English.pdf
--------------------------------------------------------------------------------
/examples/support_files/filevaultcertificate/FileVaultMaster-sdk.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deploymenttheory/go-api-sdk-jamfpro/ba55cb4a3121bdb0f6a1bc18f3572e547644bbef/examples/support_files/filevaultcertificate/FileVaultMaster-sdk.p12
--------------------------------------------------------------------------------
/examples/support_files/scriptfile.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # A simple bash script to demonstrate basic scripting concepts
4 |
5 | echo "Starting the script execution..."
6 |
7 | # Define a variable
8 | GREETING="Hello, world!"
9 |
10 | # Print the variable
11 | echo $GREETING
12 |
13 | # Define a function
14 | print_date() {
15 | echo "Today's date is: $(date)"
16 | }
17 |
18 | # Call the function
19 | print_date
20 |
21 | # Demonstrate a for loop
22 | for i in {1..5}; do
23 | echo "Iteration number $i"
24 | done
25 |
26 | echo "Script execution completed."
27 |
--------------------------------------------------------------------------------
/examples/time_zones/GetTimeZones/GetTimeZones.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // Call the GetUsers function
22 | usersList, err := client.GetTimeZones()
23 | if err != nil {
24 | log.Fatalf("Error fetching users: %v", err)
25 | }
26 |
27 | // Pretty print the user groups details in XML
28 | respJSON, err := json.MarshalIndent(usersList, "", " ") // Indent with 4 spaces
29 | if err != nil {
30 | log.Fatalf("Error marshaling user groups data: %v", err)
31 | }
32 | fmt.Println("User Groups Details:\n", string(respJSON))
33 | }
34 |
--------------------------------------------------------------------------------
/examples/user_extension_attributes/DeleteUserExtensionAttributeByID/DeleteUserExtensionAttributeByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "log"
5 |
6 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
7 | )
8 |
9 | func main() {
10 | // Define the path to the JSON configuration file
11 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
12 |
13 | // Initialize the Jamf Pro client with the HTTP client configuration
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | err = client.DeleteUserExtensionAttributeByID("1") // Replace 1 with the actual ID
20 | if err != nil {
21 | log.Fatalf("Error deleting user extension attribute by ID: %v", err)
22 | }
23 |
24 | log.Println("User extension attribute deleted successfully by ID")
25 | }
26 |
--------------------------------------------------------------------------------
/examples/user_extension_attributes/DeleteUserExtensionAttributeByName/DeleteUserExtensionAttributeByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "log"
5 |
6 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
7 | )
8 |
9 | func main() {
10 | // Define the path to the JSON configuration file
11 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
12 |
13 | // Initialize the Jamf Pro client with the HTTP client configuration
14 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
15 | if err != nil {
16 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
17 | }
18 |
19 | err = client.DeleteUserExtensionAttributeByName("attribute-name") // Replace with the actual name
20 | if err != nil {
21 | log.Fatalf("Error deleting user extension attribute by name: %v", err)
22 | }
23 |
24 | log.Println("User extension attribute deleted successfully by name")
25 | }
26 |
--------------------------------------------------------------------------------
/examples/user_groups/DeleteUserGroupByID/DeleteUserGroupByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Specify the ID of the user group to delete
21 | userGroupID := "1" // Replace with the actual ID
22 |
23 | // Call DeleteUserGroupByID
24 | err = client.DeleteUserGroupByID(userGroupID)
25 | if err != nil {
26 | fmt.Println("Error deleting user group:", err)
27 | return
28 | }
29 |
30 | fmt.Println("User group deleted successfully")
31 | }
32 |
--------------------------------------------------------------------------------
/examples/user_groups/DeleteUserGroupByName/DeleteUserGroupByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Specify the name of the user group to delete
21 | userGroupName := "Teachers" // Replace with the actual name
22 |
23 | // Call DeleteUserGroupByName
24 | err = client.DeleteUserGroupByName(userGroupName)
25 | if err != nil {
26 | fmt.Println("Error deleting user group:", err)
27 | return
28 | }
29 |
30 | fmt.Println("User group deleted successfully")
31 | }
32 |
--------------------------------------------------------------------------------
/examples/users/DeleteUserByEmail/DeleteUserByEmail.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | userEmail := "aharrison@company.com" // Example user email to delete
21 |
22 | err = client.DeleteUserByEmail(userEmail)
23 | if err != nil {
24 | log.Fatalf("Error deleting user by email: %v", err)
25 | }
26 |
27 | fmt.Println("User deleted successfully by email")
28 | }
29 |
--------------------------------------------------------------------------------
/examples/users/DeleteUserByID/DeleteUserByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | userID := "1" // Example user ID to delete
21 |
22 | err = client.DeleteUserByID(userID)
23 | if err != nil {
24 | log.Fatalf("Error deleting user by ID: %v", err)
25 | }
26 |
27 | fmt.Println("User deleted successfully by ID")
28 | }
29 |
--------------------------------------------------------------------------------
/examples/users/DeleteUserByName/DeleteUserByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | userName := "AHarrison" // Example user name to delete
21 |
22 | err = client.DeleteUserByName(userName)
23 | if err != nil {
24 | log.Fatalf("Error deleting user by name: %v", err)
25 | }
26 |
27 | fmt.Println("User deleted successfully by name")
28 | }
29 |
--------------------------------------------------------------------------------
/examples/users/GetUsers/GetUsers.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/xml"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // Call the GetUsers function
22 | usersList, err := client.GetUsers()
23 | if err != nil {
24 | log.Fatalf("Error fetching users: %v", err)
25 | }
26 |
27 | // Pretty print the user groups details in XML
28 | userGroupsXML, err := xml.MarshalIndent(usersList, "", " ") // Indent with 4 spaces
29 | if err != nil {
30 | log.Fatalf("Error marshaling user groups data: %v", err)
31 | }
32 | fmt.Println("User Groups Details:\n", string(userGroupsXML))
33 | }
34 |
--------------------------------------------------------------------------------
/examples/volume_purchasing_subscriptions/DeleteVolumePurchasingSubscriptionByID/DeleteVolumePurchasingSubscriptionByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define the ID of the subscription to delete.
21 | idToDelete := "4"
22 |
23 | err = client.DeleteVolumePurchasingSubscriptionByID(idToDelete)
24 | if err != nil {
25 | fmt.Printf("Error deleting volume purchasing subscription by ID: %s\n", err)
26 | return
27 | }
28 |
29 | fmt.Println("Volume purchasing subscription deleted successfully.")
30 | }
31 |
--------------------------------------------------------------------------------
/examples/volume_purchasing_subscriptions/DeleteVolumePurchasingSubscriptionByName/DeleteVolumePurchasingSubscriptionByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Define the name of the subscription to delete.
21 | nameToDelete := "Example Volume Purchasing Subscription"
22 |
23 | err = client.DeleteVolumePurchasingSubscriptionByName(nameToDelete)
24 | if err != nil {
25 | fmt.Printf("Error deleting volume purchasing subscription by name: %s\n", err)
26 | return
27 | }
28 |
29 | fmt.Println("Volume purchasing subscription deleted successfully.")
30 | }
31 |
--------------------------------------------------------------------------------
/examples/vpp_accounts/DeleteVPPAccountByID/DeleteVPPAccountByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Assume we are deleting the account with ID 1
21 | err = client.DeleteVPPAccountByID("1")
22 | if err != nil {
23 | log.Fatalf("Error deleting VPP account: %v", err)
24 | }
25 |
26 | fmt.Println("VPP Account deleted successfully")
27 | }
28 |
--------------------------------------------------------------------------------
/examples/vpp_accounts/GetVPPAccounts/GetVPPAccounts.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/xml"
5 | "fmt"
6 | "log"
7 |
8 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
9 | )
10 |
11 | func main() {
12 | // Define the path to the JSON configuration file
13 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
14 |
15 | // Initialize the Jamf Pro client with the HTTP client configuration
16 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
17 | if err != nil {
18 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
19 | }
20 |
21 | // Call GetVPPAccounts
22 | vppAccounts, err := client.GetVPPAccounts()
23 | if err != nil {
24 | log.Fatalf("Error fetching VPP accounts: %v", err)
25 | }
26 |
27 | // Pretty print the details in XML
28 | vppAccountXML, err := xml.MarshalIndent(vppAccounts, "", " ") // Indent with 4 spaces
29 | if err != nil {
30 | log.Fatalf("Error marshaling VPP account data: %v", err)
31 | }
32 | fmt.Println("Created Script Details:\n", string(vppAccountXML))
33 | }
34 |
--------------------------------------------------------------------------------
/examples/vpp_assignments/DeleteVPPAssignmentByID/DeleteVPPAssignmentByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Specify the ID of the VPP assignment to delete
21 | vppAssignmentID := "1" // Replace with the actual ID
22 |
23 | // Call the DeleteVPPAssignmentByID function
24 | err = client.DeleteVPPAssignmentByID(vppAssignmentID)
25 | if err != nil {
26 | log.Fatalf("Error deleting VPP Assignment by ID: %v", err)
27 | }
28 |
29 | fmt.Println("VPP Assignment deleted successfully.")
30 | }
31 |
--------------------------------------------------------------------------------
/examples/webhooks/DeleteWebhookByID/DeleteWebhookByID.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Example usage of DeleteWebhookByID
21 | err = client.DeleteWebhookByID("1") // Replace with the desired webhook ID to delete
22 | if err != nil {
23 | fmt.Printf("Error deleting webhook by ID: %v\n", err)
24 | return
25 | }
26 | fmt.Println("Webhook by ID deleted successfully")
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/examples/webhooks/DeleteWebhookByName/DeleteWebhookByName.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 |
7 | "github.com/deploymenttheory/go-api-sdk-jamfpro/sdk/jamfpro"
8 | )
9 |
10 | func main() {
11 | // Define the path to the JSON configuration file
12 | configFilePath := "/Users/dafyddwatkins/localtesting/jamfpro/clientconfig.json"
13 |
14 | // Initialize the Jamf Pro client with the HTTP client configuration
15 | client, err := jamfpro.BuildClientWithConfigFile(configFilePath)
16 | if err != nil {
17 | log.Fatalf("Failed to initialize Jamf Pro client: %v", err)
18 | }
19 |
20 | // Example usage of DeleteWebhookByName
21 | err = client.DeleteWebhookByName("Sample") // Replace with the desired webhook name to delete
22 | if err != nil {
23 | fmt.Printf("Error deleting webhook by Name: %v\n", err)
24 | return
25 | }
26 | fmt.Println("Webhook by Name deleted successfully")
27 | }
28 |
--------------------------------------------------------------------------------
/modules/import.go:
--------------------------------------------------------------------------------
1 | package modules
2 |
3 | import (
4 | "fmt"
5 | "io"
6 | "os"
7 | "path/filepath"
8 | )
9 |
10 | // ReadPayloadFromFile loads content from a file for upload
11 | func ReadPayloadFromFile(filePath string) (string, error) {
12 | absPath, err := filepath.Abs(filePath)
13 | if err != nil {
14 | return "", fmt.Errorf("failed to resolve absolute path: %v", err)
15 | }
16 |
17 | file, err := os.Open(absPath)
18 | if err != nil {
19 | return "", fmt.Errorf("failed to open file: %v", err)
20 | }
21 | defer file.Close()
22 |
23 | content, err := io.ReadAll(file)
24 | if err != nil {
25 | return "", fmt.Errorf("failed to read file: %v", err)
26 | }
27 |
28 | return string(content), nil
29 | }
30 |
--------------------------------------------------------------------------------
/sdk/helpers/iso_369_codes.go:
--------------------------------------------------------------------------------
1 | // helpers/readfile.go
2 | package helpers
3 |
--------------------------------------------------------------------------------
/sdk/integration_tests/classicapi_departments_test_data.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CreateDepartmentsMinConfigIntTest1
6 |
7 |
8 | CreateDepartmentsMaxConfigIntTest2
9 |
10 |
11 |
12 |
13 | UpdateDepartmentsMinConfigIntTest1
14 |
15 |
16 | UpdateDepartmentsMaxConfigIntTest2
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/sdk/integration_tests/common_test_harness_data.json:
--------------------------------------------------------------------------------
1 | {
2 | "JamfPro": {
3 | "ApiClient": {
4 | "displayName": "IntegrationTestAPIClient",
5 | "enabled": true,
6 | "accessTokenLifetimeSeconds": 1200
7 | },
8 | "ApiRoles": {
9 | "departments": {
10 | "name": "go-api-sdk-jamfpro-apir-departments",
11 | "privileges": ["Create Departments", "Read Departments", "Update Departments", "Delete Departments"]
12 | },
13 | "ssoFailover": {
14 | "name": "go-api-sdk-jamfpro-apir-sso-failover",
15 | "privileges": ["Read SSO Settings", "Update SSO Settings"]
16 | }
17 | }
18 | }
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/sdk/jamfpro/jamfproapi_dock_items.go:
--------------------------------------------------------------------------------
1 | // jamfproapi_dock_items.go
2 | // Jamf Pro Api - Dock Items
3 | // api reference: https://developer.jamf.com/jamf-pro/reference/post_v1-dock-items
4 | // Jamf Pro API requires the structs to support a JSON data structure.
5 | // Url endpoint introduced with jamf pro 11.2
6 |
7 | package jamfpro
8 |
9 | // TODO - endpoint currently doesnt have a full set of CRUD functions. missing a list for example
10 |
--------------------------------------------------------------------------------
/sdk/jamfpro/jamfproapi_health_check.go:
--------------------------------------------------------------------------------
1 | // jamfproapi_health_check.go
2 | // Jamf Pro Api - Health Check
3 | // api reference: https://developer.jamf.com/jamf-pro/reference/get_v1-health-check
4 | // Jamf Pro API requires the structs to support an JSON data structure.
5 |
6 | package jamfpro
7 |
8 | import "fmt"
9 |
10 | const uriHealthCheck = "/api/v1/health-check"
11 |
12 | // GetHealthCheck fetches the Jamf Pro API status.
13 | func (c *Client) GetHealthCheck() (bool, error) {
14 | endpoint := uriHealthCheck
15 | resp, err := c.HTTP.DoRequest("GET", endpoint, nil, nil)
16 | if err != nil {
17 | return false, fmt.Errorf(errMsgFailedGet, "Health Check", err)
18 | }
19 |
20 | if resp != nil && resp.Body != nil {
21 | defer resp.Body.Close()
22 | }
23 | return true, nil
24 | }
25 |
--------------------------------------------------------------------------------
/sdk/jamfpro/jamfproapi_jamf_pro_version.go:
--------------------------------------------------------------------------------
1 | // jamfproapi_jamf_pro_version.go
2 | // Jamf Pro Api - Jamf Pro Version
3 | // api reference: https://developer.jamf.com/jamf-pro/reference/get_v1-jamf-pro-version
4 | // Classic API requires the structs to support an JSON data structure.
5 |
6 | package jamfpro
7 |
8 | import (
9 | "fmt"
10 | )
11 |
12 | const uriJamfProVersion = "/api/v1/jamf-pro-version"
13 |
14 | // Response
15 |
16 | type ResponseJamfProVersion struct {
17 | Version *string `json:"Version,omitempty"`
18 | }
19 |
20 | // CRUD
21 |
22 | func (c *Client) GetJamfProVersion() (*ResponseJamfProVersion, error) {
23 | endpoint := uriJamfProVersion
24 |
25 | var version ResponseJamfProVersion
26 | resp, err := c.HTTP.DoRequest("GET", endpoint, nil, &version)
27 | if err != nil {
28 | return nil, fmt.Errorf("failed to fetch Jamf Pro version: %v", err)
29 | }
30 |
31 | if resp != nil && resp.Body != nil {
32 | defer resp.Body.Close()
33 | }
34 |
35 | return &version, nil
36 | }
37 |
--------------------------------------------------------------------------------
/sdk/jamfpro/jamfproapi_locales.go:
--------------------------------------------------------------------------------
1 | // jamfproapi_locales.go
2 | // Jamf Pro Api - Locales
3 | // api reference: https://developer.jamf.com/jamf-pro/reference/get_v1-locales
4 | // Jamf Pro API requires the structs to support a JSON data structure.
5 | package jamfpro
6 |
7 | import "fmt"
8 |
9 | const uriLocales = "/api/v1/locales"
10 |
11 | // ResourceLocale represents a single locale in Jamf Pro
12 | type ResourceLocale struct {
13 | Description string `json:"description"`
14 | Identifier string `json:"identifier"`
15 | }
16 |
17 | // GetLocales retrieves all available locales from Jamf Pro
18 | func (c *Client) GetLocales() ([]ResourceLocale, error) {
19 | endpoint := uriLocales
20 |
21 | var locales []ResourceLocale
22 | resp, err := c.HTTP.DoRequest("GET", endpoint, nil, &locales)
23 | if err != nil {
24 | return nil, fmt.Errorf(errMsgFailedGet, "locales", err)
25 | }
26 |
27 | if resp != nil && resp.Body != nil {
28 | defer resp.Body.Close()
29 | }
30 |
31 | return locales, nil
32 | }
33 |
--------------------------------------------------------------------------------
/sdk/jamfpro/jamfproapi_mobile_device_groups.go:
--------------------------------------------------------------------------------
1 | // jamfproapi_mobile_device_groups.go
2 | // Jamf Pro Api - Mobile Device Groups
3 | // api reference: https://developer.jamf.com/jamf-pro/reference/get_v1-mobile-device-groups
4 | // Jamf Pro API requires the structs to support a JSON data structure.
5 |
6 | package jamfpro
7 |
8 | // NOTE - This will be completed once jamf fully round off this endpoint. presently only covers static
9 | // account groups and doesn't smart groups.
10 |
--------------------------------------------------------------------------------
/sdk/jamfpro/jamfproapi_patch_management.go:
--------------------------------------------------------------------------------
1 | // jamfproapi_patch_management.go
2 | // Jamf Pro Api - Patch Management
3 | // api reference: https://developer.jamf.com/jamf-pro/reference/post_v2-patch-management-accept-disclaimer
4 | // Jamf Pro Api requires the structs to support an JSON data structure.
5 |
6 | package jamfpro
7 |
8 | import (
9 | "fmt"
10 | )
11 |
12 | const uriPatchManagementDisclaimer = "/api/v2/patch-management-accept-disclaimer"
13 |
14 | // AcceptPatchManagementDisclaimer accepts the Patch Management disclaimer
15 | func (c *Client) AcceptPatchManagementDisclaimer() error {
16 | resp, err := c.HTTP.DoRequest("POST", uriPatchManagementDisclaimer, nil, nil)
17 | if err != nil {
18 | return fmt.Errorf("failed to accept Patch Management disclaimer: %v", err)
19 | }
20 |
21 | if resp != nil && resp.Body != nil {
22 | defer resp.Body.Close()
23 | }
24 |
25 | return nil
26 | }
27 |
--------------------------------------------------------------------------------
/sdk/jamfpro/jamfproapi_time_zones.go:
--------------------------------------------------------------------------------
1 | // jamfproapi_time_zones.go
2 | // Jamf Pro Api - Time Zones
3 | // api reference: https://developer.jamf.com/jamf-pro/reference/get_v1-time-zones
4 | // Jamf Pro API requires the structs to support a JSON data structure.
5 |
6 | package jamfpro
7 |
8 | import (
9 | "fmt"
10 | )
11 |
12 | const uriTimeZones = "/api/v1/time-zones"
13 |
14 | // Resource structure
15 | type ResourceTimeZone struct {
16 | ZoneId string `json:"zoneId"`
17 | Region string `json:"region"`
18 | DisplayName string `json:"displayName"`
19 | }
20 |
21 | // CRUD
22 |
23 | // GetTimeZones retrieves the list of available time zones from Jamf Pro.
24 | func (c *Client) GetTimeZones() ([]ResourceTimeZone, error) {
25 | endpoint := uriTimeZones
26 |
27 | var timeZones []ResourceTimeZone
28 | resp, err := c.HTTP.DoRequest("GET", endpoint, nil, &timeZones)
29 | if err != nil {
30 | return nil, fmt.Errorf(errMsgFailedGet, "time zones", err)
31 | }
32 |
33 | if resp != nil && resp.Body != nil {
34 | defer resp.Body.Close()
35 | }
36 |
37 | return timeZones, nil
38 | }
39 |
--------------------------------------------------------------------------------
/sdk/jamfpro/jamfproapi_venafi.go:
--------------------------------------------------------------------------------
1 | // jamfproapi_venafi.go
2 | // Jamf Pro Api - Venafi
3 | // api reference: https://developer.jamf.com/jamf-pro/reference/post_v1-pki-venafi
4 | // Jamf Pro API requires the structs to support a JSON data structure.
5 |
6 | package jamfpro
7 |
8 | // TODO
9 |
--------------------------------------------------------------------------------
/sdk/jamfpro/shared_progress_reader.go:
--------------------------------------------------------------------------------
1 | // shared_progress_reader.go
2 | package jamfpro
3 |
4 | import "io"
5 |
6 | // ProgressReader wraps an io.Reader to report progress on read operations
7 | type ProgressReader struct {
8 | reader io.Reader
9 | totalBytes int64
10 | readBytes int64
11 | progressFn func(readBytes, totalBytes int64, unit string)
12 | }
13 |
14 | // Read implements the io.Reader interface.
15 | func (r *ProgressReader) Read(p []byte) (int, error) {
16 | n, err := r.reader.Read(p)
17 | r.readBytes += int64(n)
18 |
19 | const kb = 1024
20 | const mb = 1024 * kb
21 |
22 | if r.totalBytes > mb { // report in MB if file is larger than 1MB
23 | r.progressFn(r.readBytes/mb, r.totalBytes/mb, "MB")
24 | } else { // otherwise, report in KB
25 | r.progressFn(r.readBytes/kb, r.totalBytes/kb, "KB")
26 | }
27 |
28 | return n, err
29 | }
30 |
--------------------------------------------------------------------------------