All URIs are relative to https://<sub_domain>.api.kandji.io
Method | HTTP request | Description |
---|---|---|
CreateCustomProfile | Post /api/v1/library/custom-profiles | Create Custom Profile |
DeleteCustomProfile | Delete /api/v1/library/custom-profiles/{library_item_id} | Delete Custom Profile |
GetCustomProfile | Get /api/v1/library/custom-profiles/{library_item_id} | Get Custom Profile |
ListCustomProfiles | Get /api/v1/library/custom-profiles | List Custom Profiles |
UpdateCustomProfile | Patch /api/v1/library/custom-profiles/{library_item_id} | Update Custom Profile |
map[string]interface{} CreateCustomProfile(ctx).Name(name).File(file).Active(active).Execute()
Create Custom Profile
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/MScottBlake/kandji-go-sdk"
)
func main() {
name := "name_example" // string | (Required) The profile name
file := os.NewFile(1234, "some_file") // *os.File | (Required) The path to the profile's .mobileconfig file
active := "active_example" // string | (Optional, default=true) Whether this library item is active
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomProfilesAPI.CreateCustomProfile(context.Background()).Name(name).File(file).Active(active).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomProfilesAPI.CreateCustomProfile``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateCustomProfile`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `CustomProfilesAPI.CreateCustomProfile`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateCustomProfileRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
name | string | (Required) The profile name | |
file | *os.File | (Required) The path to the profile's .mobileconfig file | |
active | string | (Optional, default=true) Whether this library item is active |
map[string]interface{}
- Content-Type: multipart/form-data
- Accept: application/json; charset=utf-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteCustomProfile(ctx, libraryItemId).Execute()
Delete Custom Profile
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/MScottBlake/kandji-go-sdk"
)
func main() {
libraryItemId := "libraryItemId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.CustomProfilesAPI.DeleteCustomProfile(context.Background(), libraryItemId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomProfilesAPI.DeleteCustomProfile``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
libraryItemId | string |
Other parameters are passed through a pointer to a apiDeleteCustomProfileRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: text/html; charset=utf-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]interface{} GetCustomProfile(ctx, libraryItemId).Execute()
Get Custom Profile
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/MScottBlake/kandji-go-sdk"
)
func main() {
libraryItemId := "libraryItemId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomProfilesAPI.GetCustomProfile(context.Background(), libraryItemId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomProfilesAPI.GetCustomProfile``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCustomProfile`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `CustomProfilesAPI.GetCustomProfile`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
libraryItemId | string |
Other parameters are passed through a pointer to a apiGetCustomProfileRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
map[string]interface{}
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]interface{} ListCustomProfiles(ctx).Page(page).Execute()
List Custom Profiles
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/MScottBlake/kandji-go-sdk"
)
func main() {
page := "1" // string | Optional page number. Used when results exceed pagination threshold. A hard upper limit is set at 300 device records returned per request. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomProfilesAPI.ListCustomProfiles(context.Background()).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomProfilesAPI.ListCustomProfiles``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListCustomProfiles`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `CustomProfilesAPI.ListCustomProfiles`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListCustomProfilesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
page | string | Optional page number. Used when results exceed pagination threshold. A hard upper limit is set at 300 device records returned per request. |
map[string]interface{}
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]interface{} UpdateCustomProfile(ctx, libraryItemId).Execute()
Update Custom Profile
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/MScottBlake/kandji-go-sdk"
)
func main() {
libraryItemId := "libraryItemId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomProfilesAPI.UpdateCustomProfile(context.Background(), libraryItemId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomProfilesAPI.UpdateCustomProfile``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateCustomProfile`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `CustomProfilesAPI.UpdateCustomProfile`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
libraryItemId | string |
Other parameters are passed through a pointer to a apiUpdateCustomProfileRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
map[string]interface{}
- Content-Type: multipart/form-data
- Accept: application/json; charset=utf-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]