Skip to content

Commit

Permalink
Add GetProfile endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jessepeterson committed Nov 3, 2022
1 parent 0f4dc72 commit 3b6c000
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions godep/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,11 @@ func (c *Client) RemoveProfile(ctx context.Context, name string, devices []strin
resp := new(ClearProfileResponse)
return resp, c.do(ctx, name, http.MethodDelete, "/profile/devices", req, resp)
}

// GetProfile uses the Apple "Get a Profile" API endpoint to return the
// DEP profile named by the given UUID.
// See https://developer.apple.com/documentation/devicemanagement/get_a_profile
func (c *Client) GetProfile(ctx context.Context, name, uuid string) (*Profile, error) {
resp := new(Profile)
return resp, c.do(ctx, name, http.MethodGet, "/profile?profile_uuid="+uuid, nil, resp)
}

0 comments on commit 3b6c000

Please sign in to comment.