Documentation
¶
Index ¶
- Constants
- type AssignedServerLinks
- type Client
- func (c *Client) AssignDevicesToServer(ctx context.Context, mdmServerID string, deviceIDs []string) (*OrgDeviceActivityResponse, error)
- func (c *Client) GetAssignedDeviceManagementServiceIDForADevice(ctx context.Context, deviceID string) (*OrgDeviceAssignedServerLinkageResponse, error)
- func (c *Client) GetAssignedDeviceManagementServiceInformationByDeviceID(ctx context.Context, deviceID string, opts *GetAssignedServerInfoOptions) (*MDMServerResponse, error)
- func (c *Client) GetDeviceManagementServices(ctx context.Context, opts *GetMDMServersOptions) (*MDMServersResponse, error)
- func (c *Client) GetMDMServerDeviceLinkages(ctx context.Context, mdmServerID string, ...) (*MDMServerDevicesLinkagesResponse, error)
- func (c *Client) UnassignDevicesFromServer(ctx context.Context, mdmServerID string, deviceIDs []string) (*OrgDeviceActivityResponse, error)
- type GetAssignedServerInfoOptions
- type GetMDMServerDeviceLinkagesOptions
- type GetMDMServersOptions
- type MDMServer
- type MDMServerAttributes
- type MDMServerDeviceLinkage
- type MDMServerDevicesLinkagesResponse
- type MDMServerDevicesLinks
- type MDMServerDevicesRelationship
- type MDMServerRelationships
- type MDMServerResponse
- type MDMServersResponse
- type OrgDeviceActivity
- type OrgDeviceActivityAttributes
- type OrgDeviceActivityCreateAttributes
- type OrgDeviceActivityCreateRelationships
- type OrgDeviceActivityCreateRequest
- type OrgDeviceActivityData
- type OrgDeviceActivityDeviceLinkage
- type OrgDeviceActivityDevicesRelationship
- type OrgDeviceActivityLinks
- type OrgDeviceActivityMDMServerLinkage
- type OrgDeviceActivityMDMServerRelationship
- type OrgDeviceActivityResponse
- type OrgDeviceAssignedServerLinkage
- type OrgDeviceAssignedServerLinkageResponse
Constants ¶
const ( ActivityTypeAssignDevices = "ASSIGN_DEVICES" ActivityTypeUnassignDevices = "UNASSIGN_DEVICES" )
Activity type constants
const ( ActivityStatusInProgress = "IN_PROGRESS" ActivityStatusCompleted = "COMPLETED" ActivityStatusFailed = "FAILED" )
Activity status constants
const ( ActivitySubStatusSubmitted = "SUBMITTED" ActivitySubStatusProcessing = "PROCESSING" )
Activity sub-status constants
const ( FieldServerName = "serverName" FieldServerType = "serverType" FieldCreatedDateTime = "createdDateTime" FieldUpdatedDateTime = "updatedDateTime" FieldDevices = "devices" )
MDM Server field constants for field selection
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssignedServerLinks ¶
type AssignedServerLinks struct { Self string `json:"self,omitempty"` Related string `json:"related,omitempty"` }
AssignedServerLinks contains linkage navigation links
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides access to Apple Business Manager Device Management Services API
func (*Client) AssignDevicesToServer ¶
func (c *Client) AssignDevicesToServer(ctx context.Context, mdmServerID string, deviceIDs []string) (*OrgDeviceActivityResponse, error)
AssignDevicesToServer assigns devices to an MDM server URL: POST https://api-business.apple.com/v1/orgDeviceActivities https://developer.apple.com/documentation/applebusinessmanagerapi/create-an-orgdeviceactivity
func (*Client) GetAssignedDeviceManagementServiceIDForADevice ¶
func (c *Client) GetAssignedDeviceManagementServiceIDForADevice(ctx context.Context, deviceID string) (*OrgDeviceAssignedServerLinkageResponse, error)
GetAssignedDeviceManagementServiceIDForADevice retrieves the assigned device management service ID linkage for a device URL: GET https://api-business.apple.com/v1/orgDevices/{id}/relationships/assignedServer https://developer.apple.com/documentation/applebusinessmanagerapi/get-the-assigned-server-id-for-an-orgdevice
func (*Client) GetAssignedDeviceManagementServiceInformationByDeviceID ¶
func (c *Client) GetAssignedDeviceManagementServiceInformationByDeviceID(ctx context.Context, deviceID string, opts *GetAssignedServerInfoOptions) (*MDMServerResponse, error)
GetAssignedDeviceManagementServiceInformationByDeviceID retrieves the assigned device management service information for a device URL: GET https://api-business.apple.com/v1/orgDevices/{id}/assignedServer https://developer.apple.com/documentation/applebusinessmanagerapi/get-the-assigned-server-information-for-an-orgdevice
func (*Client) GetDeviceManagementServices ¶
func (c *Client) GetDeviceManagementServices(ctx context.Context, opts *GetMDMServersOptions) (*MDMServersResponse, error)
GetDeviceManagementServices retrieves a list of device management services (MDM servers) in an organization URL: GET https://api-business.apple.com/v1/mdmServers https://developer.apple.com/documentation/applebusinessmanagerapi/get-mdm-servers
func (*Client) GetMDMServerDeviceLinkages ¶
func (c *Client) GetMDMServerDeviceLinkages(ctx context.Context, mdmServerID string, opts *GetMDMServerDeviceLinkagesOptions) (*MDMServerDevicesLinkagesResponse, error)
GetMDMServerDeviceLinkages retrieves a list of device IDs assigned to an MDM server URL: GET https://api-business.apple.com/v1/mdmServers/{id}/relationships/devices https://developer.apple.com/documentation/applebusinessmanagerapi/get-all-device-ids-for-a-mdmserver
func (*Client) UnassignDevicesFromServer ¶
func (c *Client) UnassignDevicesFromServer(ctx context.Context, mdmServerID string, deviceIDs []string) (*OrgDeviceActivityResponse, error)
UnassignDevicesFromServer unassigns devices from an MDM server URL: POST https://api-business.apple.com/v1/orgDeviceActivities https://developer.apple.com/documentation/applebusinessmanagerapi/create-an-orgdeviceactivity
type GetAssignedServerInfoOptions ¶
type GetAssignedServerInfoOptions struct { // Field selection - fields to return for mdmServers // Possible values: serverName, serverType, createdDateTime, updatedDateTime, devices Fields []string `json:"fields,omitempty"` }
GetAssignedServerInfoOptions represents the query parameters for getting assigned server info
type GetMDMServerDeviceLinkagesOptions ¶
type GetMDMServerDeviceLinkagesOptions struct { // Limit the number of included related resources to return (max 1000) Limit int `json:"limit,omitempty"` }
GetMDMServerDeviceLinkagesOptions represents the query parameters for getting MDM server device linkages
type GetMDMServersOptions ¶
type GetMDMServersOptions struct { // Field selection - fields to return for mdmServers // Possible values: serverName, serverType, createdDateTime, updatedDateTime, devices Fields []string `json:"fields,omitempty"` // Limit the number of included related resources to return (max 1000) Limit int `json:"limit,omitempty"` }
GetMDMServersOptions represents the query parameters for getting MDM servers
type MDMServer ¶
type MDMServer struct { ID string `json:"id"` Type string `json:"type"` Attributes *MDMServerAttributes `json:"attributes,omitempty"` Relationships *MDMServerRelationships `json:"relationships,omitempty"` }
MDMServer represents an MDM server in the Apple Business Manager system
type MDMServerAttributes ¶
type MDMServerAttributes struct { ServerName string `json:"serverName,omitempty"` ServerType string `json:"serverType,omitempty"` CreatedDateTime *time.Time `json:"createdDateTime,omitempty"` UpdatedDateTime *time.Time `json:"updatedDateTime,omitempty"` Devices []string `json:"devices,omitempty"` }
MDMServerAttributes contains the MDM server attributes
type MDMServerDeviceLinkage ¶
type MDMServerDeviceLinkage struct { Type string `json:"type"` // Should be "orgDevices" ID string `json:"id"` // Device ID }
MDMServerDeviceLinkage represents a device linkage in the MDM server relationships
type MDMServerDevicesLinkagesResponse ¶
type MDMServerDevicesLinkagesResponse struct { Data []MDMServerDeviceLinkage `json:"data"` Links *axm.Links `json:"links,omitempty"` Meta *axm.Meta `json:"meta,omitempty"` }
MDMServerDevicesLinkagesResponse represents the response for getting device linkages for an MDM server
type MDMServerDevicesLinks ¶
type MDMServerDevicesLinks struct {
Self string `json:"self,omitempty"`
}
MDMServerDevicesLinks contains the navigation links for devices
type MDMServerDevicesRelationship ¶
type MDMServerDevicesRelationship struct {
Links *MDMServerDevicesLinks `json:"links,omitempty"`
}
MDMServerDevicesRelationship contains the devices relationship links
type MDMServerRelationships ¶
type MDMServerRelationships struct {
Devices *MDMServerDevicesRelationship `json:"devices,omitempty"`
}
MDMServerRelationships contains the MDM server relationships
type MDMServerResponse ¶
type MDMServerResponse struct { Data MDMServer `json:"data"` Links *axm.Links `json:"links,omitempty"` }
MDMServerResponse represents the response for getting a single MDM server
type MDMServersResponse ¶
type MDMServersResponse struct { Data []MDMServer `json:"data"` Meta *axm.Meta `json:"meta,omitempty"` Links *axm.Links `json:"links,omitempty"` }
MDMServersResponse represents the response for getting MDM servers
type OrgDeviceActivity ¶
type OrgDeviceActivity struct { ID string `json:"id"` Type string `json:"type"` Attributes *OrgDeviceActivityAttributes `json:"attributes,omitempty"` Links *OrgDeviceActivityLinks `json:"links,omitempty"` }
OrgDeviceActivity represents a device activity (assign/unassign operations)
type OrgDeviceActivityAttributes ¶
type OrgDeviceActivityAttributes struct { Status string `json:"status,omitempty"` SubStatus string `json:"subStatus,omitempty"` CreatedDateTime *time.Time `json:"createdDateTime,omitempty"` ActivityType string `json:"activityType,omitempty"` }
OrgDeviceActivityAttributes contains the activity attributes
type OrgDeviceActivityCreateAttributes ¶
type OrgDeviceActivityCreateAttributes struct {
ActivityType string `json:"activityType"`
}
OrgDeviceActivityCreateAttributes contains the activity creation attributes
type OrgDeviceActivityCreateRelationships ¶
type OrgDeviceActivityCreateRelationships struct { MDMServer *OrgDeviceActivityMDMServerRelationship `json:"mdmServer,omitempty"` Devices *OrgDeviceActivityDevicesRelationship `json:"devices,omitempty"` }
OrgDeviceActivityCreateRelationships contains the relationships for activity creation
type OrgDeviceActivityCreateRequest ¶
type OrgDeviceActivityCreateRequest struct {
Data OrgDeviceActivityData `json:"data"`
}
OrgDeviceActivityCreateRequest represents the request for creating a device activity
type OrgDeviceActivityData ¶
type OrgDeviceActivityData struct { Type string `json:"type"` Attributes OrgDeviceActivityCreateAttributes `json:"attributes"` Relationships OrgDeviceActivityCreateRelationships `json:"relationships"` }
OrgDeviceActivityData contains the activity data for the request
type OrgDeviceActivityDeviceLinkage ¶
type OrgDeviceActivityDeviceLinkage struct { Type string `json:"type"` // Should be "orgDevices" ID string `json:"id"` // Device ID }
OrgDeviceActivityDeviceLinkage represents a device linkage
type OrgDeviceActivityDevicesRelationship ¶
type OrgDeviceActivityDevicesRelationship struct {
Data []OrgDeviceActivityDeviceLinkage `json:"data"`
}
OrgDeviceActivityDevicesRelationship represents the devices relationship
type OrgDeviceActivityLinks ¶
type OrgDeviceActivityLinks struct {
Self string `json:"self,omitempty"`
}
OrgDeviceActivityLinks contains activity navigation links
type OrgDeviceActivityMDMServerLinkage ¶
type OrgDeviceActivityMDMServerLinkage struct { Type string `json:"type"` // Should be "mdmServers" ID string `json:"id"` // MDM Server ID }
OrgDeviceActivityMDMServerLinkage represents the MDM server linkage
type OrgDeviceActivityMDMServerRelationship ¶
type OrgDeviceActivityMDMServerRelationship struct {
Data OrgDeviceActivityMDMServerLinkage `json:"data"`
}
OrgDeviceActivityMDMServerRelationship represents the MDM server relationship
type OrgDeviceActivityResponse ¶
type OrgDeviceActivityResponse struct { Data OrgDeviceActivity `json:"data"` Links *axm.Links `json:"links,omitempty"` }
OrgDeviceActivityResponse represents the response for creating an org device activity
type OrgDeviceAssignedServerLinkage ¶
type OrgDeviceAssignedServerLinkage struct { Type string `json:"type"` // Should be "mdmServers" ID string `json:"id"` // MDM Server ID }
OrgDeviceAssignedServerLinkage represents the linkage between a device and its assigned server
type OrgDeviceAssignedServerLinkageResponse ¶
type OrgDeviceAssignedServerLinkageResponse struct { Data OrgDeviceAssignedServerLinkage `json:"data"` Links *AssignedServerLinks `json:"links,omitempty"` }
OrgDeviceAssignedServerLinkageResponse represents the response for getting assigned server linkage