All URIs are relative to /api
Method | HTTP request | Description |
---|---|---|
V1PackagesDeleteMultiplePost | Post /v1/packages/delete-multiple | Delete multiple packages at once |
V1PackagesExportPost | Post /v1/packages/export | Export Packages collection |
V1PackagesGet | Get /v1/packages | Retrieve Packages |
V1PackagesIdDelete | Delete /v1/packages/{id} | Remove specified package |
V1PackagesIdGet | Get /v1/packages/{id} | Get specified Package object |
V1PackagesIdHistoryExportPost | Post /v1/packages/{id}/history/export | Export history object collection in specified format for specified Packages |
V1PackagesIdHistoryGet | Get /v1/packages/{id}/history | Get specified Package History object |
V1PackagesIdHistoryPost | Post /v1/packages/{id}/history | Add specified Package history object notes |
V1PackagesIdManifestDelete | Delete /v1/packages/{id}/manifest | Delete the manifest for a specified package |
V1PackagesIdManifestPost | Post /v1/packages/{id}/manifest | Add a manifest to a package |
V1PackagesIdPut | Put /v1/packages/{id} | Update specified package object |
V1PackagesIdUploadPost | Post /v1/packages/{id}/upload | Upload package |
V1PackagesPost | Post /v1/packages | Create package |
V1PackagesDeleteMultiplePost(ctx).Ids(ids).Execute()
Delete multiple packages at once
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yohan460/go-jamf-api/api"
)
func main() {
ids := *openapiclient.NewIds() // Ids | ids of the package to be deleted
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.PackagesAPI.V1PackagesDeleteMultiplePost(context.Background()).Ids(ids).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PackagesAPI.V1PackagesDeleteMultiplePost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiV1PackagesDeleteMultiplePostRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
ids | Ids | ids of the package to be deleted |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
interface{} V1PackagesExportPost(ctx).ExportFields(exportFields).ExportLabels(exportLabels).Page(page).PageSize(pageSize).Sort(sort).Filter(filter).ExportParameters(exportParameters).Execute()
Export Packages collection
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yohan460/go-jamf-api/api"
)
func main() {
exportFields := []string{"Inner_example"} // []string | Export fields parameter, used to change default order or ignore some of the response properties. Default is empty array, which means that all fields of the response entity will be serialized. Example: export-fields=id,username (optional) (default to [])
exportLabels := []string{"Inner_example"} // []string | Export labels parameter, used to customize fieldnames/columns in the exported file. Default is empty array, which means that response properties names will be used. Number of the provided labels must match the number of export-fields Example: export-labels=identifier,name with matching: export-fields=id,username (optional) (default to [])
page := int64(56) // int64 | (optional) (default to 0)
pageSize := int64(56) // int64 | (optional) (default to 100)
sort := []string{"Inner_example"} // []string | Sorts results by one or more criteria, following the format property:asc/desc. Default sort is ID:asc. If using multiple criteria, separate with commas. (optional) (default to ["id:asc"])
filter := "filter_example" // string | Filters results. Use RSQL format for query. Allows for many fields, including ID, name, etc. Can be combined with paging and sorting. Default filter is an empty query and returns all results from the requested page. (optional) (default to "")
exportParameters := *openapiclient.NewExportParameters() // ExportParameters | Optional. Can be used to override query parameters so that the URI does not exceed the 2,000 character limit. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PackagesAPI.V1PackagesExportPost(context.Background()).ExportFields(exportFields).ExportLabels(exportLabels).Page(page).PageSize(pageSize).Sort(sort).Filter(filter).ExportParameters(exportParameters).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PackagesAPI.V1PackagesExportPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `V1PackagesExportPost`: interface{}
fmt.Fprintf(os.Stdout, "Response from `PackagesAPI.V1PackagesExportPost`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiV1PackagesExportPostRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
exportFields | []string | Export fields parameter, used to change default order or ignore some of the response properties. Default is empty array, which means that all fields of the response entity will be serialized. Example: export-fields=id,username | [default to []] |
exportLabels | []string | Export labels parameter, used to customize fieldnames/columns in the exported file. Default is empty array, which means that response properties names will be used. Number of the provided labels must match the number of export-fields Example: export-labels=identifier,name with matching: export-fields=id,username | [default to []] |
page | int64 | [default to 0] | |
pageSize | int64 | [default to 100] | |
sort | []string | Sorts results by one or more criteria, following the format property:asc/desc. Default sort is ID:asc. If using multiple criteria, separate with commas. | [default to ["id:asc"]] |
filter | string | Filters results. Use RSQL format for query. Allows for many fields, including ID, name, etc. Can be combined with paging and sorting. Default filter is an empty query and returns all results from the requested page. | [default to ""] |
exportParameters | ExportParameters | Optional. Can be used to override query parameters so that the URI does not exceed the 2,000 character limit. |
interface{}
- Content-Type: application/json
- Accept: text/csv, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PackagesSearchResults V1PackagesGet(ctx).Page(page).PageSize(pageSize).Sort(sort).Filter(filter).Execute()
Retrieve Packages
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yohan460/go-jamf-api/api"
)
func main() {
page := int64(56) // int64 | (optional) (default to 0)
pageSize := int64(56) // int64 | (optional) (default to 100)
sort := []string{"Inner_example"} // []string | Sorts results by one or more criteria, following the format property:asc/desc. Default sort is ID:asc. If using multiple criteria, separate with commas. (optional) (default to ["id:asc"])
filter := "filter_example" // string | Filters results. Use RSQL format for query. Allows for many fields, including ID, name, etc. Can be combined with paging and sorting. Fields allowed in the query: id, fileName, packageName, categoryId, info, notes, manifestFileName. Default filter is an empty query and returns all results from the requested page. (optional) (default to "")
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PackagesAPI.V1PackagesGet(context.Background()).Page(page).PageSize(pageSize).Sort(sort).Filter(filter).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PackagesAPI.V1PackagesGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `V1PackagesGet`: PackagesSearchResults
fmt.Fprintf(os.Stdout, "Response from `PackagesAPI.V1PackagesGet`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiV1PackagesGetRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
page | int64 | [default to 0] | |
pageSize | int64 | [default to 100] | |
sort | []string | Sorts results by one or more criteria, following the format property:asc/desc. Default sort is ID:asc. If using multiple criteria, separate with commas. | [default to ["id:asc"]] |
filter | string | Filters results. Use RSQL format for query. Allows for many fields, including ID, name, etc. Can be combined with paging and sorting. Fields allowed in the query: id, fileName, packageName, categoryId, info, notes, manifestFileName. Default filter is an empty query and returns all results from the requested page. | [default to ""] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V1PackagesIdDelete(ctx, id).Execute()
Remove specified package
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yohan460/go-jamf-api/api"
)
func main() {
id := "id_example" // string | Instance ID of package
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.PackagesAPI.V1PackagesIdDelete(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PackagesAPI.V1PackagesIdDelete``: %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. | |
id | string | Instance ID of package |
Other parameters are passed through a pointer to a apiV1PackagesIdDeleteRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Package V1PackagesIdGet(ctx, id).Execute()
Get specified Package object
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yohan460/go-jamf-api/api"
)
func main() {
id := "id_example" // string | instance id of package
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PackagesAPI.V1PackagesIdGet(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PackagesAPI.V1PackagesIdGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `V1PackagesIdGet`: Package
fmt.Fprintf(os.Stdout, "Response from `PackagesAPI.V1PackagesIdGet`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | instance id of package |
Other parameters are passed through a pointer to a apiV1PackagesIdGetRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
interface{} V1PackagesIdHistoryExportPost(ctx, id).ExportFields(exportFields).ExportLabels(exportLabels).Page(page).PageSize(pageSize).Sort(sort).Filter(filter).ExportParameters(exportParameters).Execute()
Export history object collection in specified format for specified Packages
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yohan460/go-jamf-api/api"
)
func main() {
id := "id_example" // string | Instance ID of package history note
exportFields := []string{"Inner_example"} // []string | Export fields parameter, used to change default order or ignore some of the response properties. Default is empty array, which means that all fields of the response entity will be serialized. Example: export-fields=id,username (optional) (default to [])
exportLabels := []string{"Inner_example"} // []string | Export labels parameter, used to customize fieldnames/columns in the exported file. Default is empty array, which means that response properties names will be used. Number of the provided labels must match the number of export-fields Example: export-labels=identifier,name with matching: export-fields=id,username (optional) (default to [])
page := int64(56) // int64 | (optional) (default to 0)
pageSize := int64(56) // int64 | (optional) (default to 100)
sort := []string{"Inner_example"} // []string | Sorts results by one or more criteria, following the format property:asc/desc. Default sort is ID:asc. If using multiple criteria, separate with commas. (optional) (default to ["date:desc"])
filter := "filter_example" // string | Filters results. Use RSQL format for query. Allows for many fields, including ID, name, etc. Can be combined with paging and sorting. Default filter is an empty query and returns all results from the requested page. (optional) (default to "")
exportParameters := *openapiclient.NewExportParameters() // ExportParameters | Optional. Can be used to override query parameters so that the URI does not exceed the 2,000 character limit. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PackagesAPI.V1PackagesIdHistoryExportPost(context.Background(), id).ExportFields(exportFields).ExportLabels(exportLabels).Page(page).PageSize(pageSize).Sort(sort).Filter(filter).ExportParameters(exportParameters).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PackagesAPI.V1PackagesIdHistoryExportPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `V1PackagesIdHistoryExportPost`: interface{}
fmt.Fprintf(os.Stdout, "Response from `PackagesAPI.V1PackagesIdHistoryExportPost`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Instance ID of package history note |
Other parameters are passed through a pointer to a apiV1PackagesIdHistoryExportPostRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
exportFields | []string | Export fields parameter, used to change default order or ignore some of the response properties. Default is empty array, which means that all fields of the response entity will be serialized. Example: export-fields=id,username | [default to []] exportLabels | []string | Export labels parameter, used to customize fieldnames/columns in the exported file. Default is empty array, which means that response properties names will be used. Number of the provided labels must match the number of export-fields Example: export-labels=identifier,name with matching: export-fields=id,username | [default to []] page | int64 | | [default to 0] pageSize | int64 | | [default to 100] sort | []string | Sorts results by one or more criteria, following the format property:asc/desc. Default sort is ID:asc. If using multiple criteria, separate with commas. | [default to ["date:desc"]] filter | string | Filters results. Use RSQL format for query. Allows for many fields, including ID, name, etc. Can be combined with paging and sorting. Default filter is an empty query and returns all results from the requested page. | [default to ""] exportParameters | ExportParameters | Optional. Can be used to override query parameters so that the URI does not exceed the 2,000 character limit. |
interface{}
- Content-Type: application/json
- Accept: text/csv, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HistorySearchResults V1PackagesIdHistoryGet(ctx, id).Page(page).PageSize(pageSize).Sort(sort).Filter(filter).Execute()
Get specified Package History object
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yohan460/go-jamf-api/api"
)
func main() {
id := "id_example" // string | Instance ID of package history
page := int64(56) // int64 | (optional) (default to 0)
pageSize := int64(56) // int64 | (optional) (default to 100)
sort := []string{"Inner_example"} // []string | Sorts results by one or more criteria, following the format property:asc/desc. Default sort is ID:asc. If using multiple criteria, separate with commas. (optional) (default to ["date:desc"])
filter := "filter_example" // string | Filters results. Use RSQL format for query. Allows for many fields, including ID, name, etc. Can be combined with paging and sorting. Default filter is an empty query and returns all results from the requested page. (optional) (default to "")
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PackagesAPI.V1PackagesIdHistoryGet(context.Background(), id).Page(page).PageSize(pageSize).Sort(sort).Filter(filter).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PackagesAPI.V1PackagesIdHistoryGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `V1PackagesIdHistoryGet`: HistorySearchResults
fmt.Fprintf(os.Stdout, "Response from `PackagesAPI.V1PackagesIdHistoryGet`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Instance ID of package history |
Other parameters are passed through a pointer to a apiV1PackagesIdHistoryGetRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
page | int64 | | [default to 0] pageSize | int64 | | [default to 100] sort | []string | Sorts results by one or more criteria, following the format property:asc/desc. Default sort is ID:asc. If using multiple criteria, separate with commas. | [default to ["date:desc"]] filter | string | Filters results. Use RSQL format for query. Allows for many fields, including ID, name, etc. Can be combined with paging and sorting. Default filter is an empty query and returns all results from the requested page. | [default to ""]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ObjectHistory V1PackagesIdHistoryPost(ctx, id).ObjectHistoryNote(objectHistoryNote).Execute()
Add specified Package history object notes
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yohan460/go-jamf-api/api"
)
func main() {
id := "id_example" // string | Instance ID of package history
objectHistoryNote := *openapiclient.NewObjectHistoryNote("A generic note can sometimes be useful, but generally not.") // ObjectHistoryNote | History note to be created
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PackagesAPI.V1PackagesIdHistoryPost(context.Background(), id).ObjectHistoryNote(objectHistoryNote).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PackagesAPI.V1PackagesIdHistoryPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `V1PackagesIdHistoryPost`: ObjectHistory
fmt.Fprintf(os.Stdout, "Response from `PackagesAPI.V1PackagesIdHistoryPost`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Instance ID of package history |
Other parameters are passed through a pointer to a apiV1PackagesIdHistoryPostRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
objectHistoryNote | ObjectHistoryNote | History note to be created |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
V1PackagesIdManifestDelete(ctx, id).Execute()
Delete the manifest for a specified package
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yohan460/go-jamf-api/api"
)
func main() {
id := "id_example" // string | Id of the package to delete manifest from
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.PackagesAPI.V1PackagesIdManifestDelete(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PackagesAPI.V1PackagesIdManifestDelete``: %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. | |
id | string | Id of the package to delete manifest from |
Other parameters are passed through a pointer to a apiV1PackagesIdManifestDeleteRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Package V1PackagesIdManifestPost(ctx, id).File(file).Execute()
Add a manifest to a package
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yohan460/go-jamf-api/api"
)
func main() {
id := "id_example" // string | Id of the package the manifest should be assigned to
file := os.NewFile(1234, "some_file") // *os.File | The manifest file to upload
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PackagesAPI.V1PackagesIdManifestPost(context.Background(), id).File(file).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PackagesAPI.V1PackagesIdManifestPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `V1PackagesIdManifestPost`: Package
fmt.Fprintf(os.Stdout, "Response from `PackagesAPI.V1PackagesIdManifestPost`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Id of the package the manifest should be assigned to |
Other parameters are passed through a pointer to a apiV1PackagesIdManifestPostRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
file | *os.File | The manifest file to upload |
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Package V1PackagesIdPut(ctx, id).Package_(package_).Execute()
Update specified package object
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yohan460/go-jamf-api/api"
)
func main() {
id := "id_example" // string | Instance ID of package
package_ := *openapiclient.NewPackage("Google Chrome", "my-package.pkg", "-1", int64(3), false, false, false, false, false, false, false) // Package | Package object to update. IDs defined in this body will be ignored
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PackagesAPI.V1PackagesIdPut(context.Background(), id).Package_(package_).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PackagesAPI.V1PackagesIdPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `V1PackagesIdPut`: Package
fmt.Fprintf(os.Stdout, "Response from `PackagesAPI.V1PackagesIdPut`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Instance ID of package |
Other parameters are passed through a pointer to a apiV1PackagesIdPutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
package_ | Package | Package object to update. IDs defined in this body will be ignored |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HrefResponse V1PackagesIdUploadPost(ctx, id).File(file).Execute()
Upload package
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yohan460/go-jamf-api/api"
)
func main() {
id := "id_example" // string | instance id of package
file := os.NewFile(1234, "some_file") // *os.File | The file to upload
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PackagesAPI.V1PackagesIdUploadPost(context.Background(), id).File(file).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PackagesAPI.V1PackagesIdUploadPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `V1PackagesIdUploadPost`: HrefResponse
fmt.Fprintf(os.Stdout, "Response from `PackagesAPI.V1PackagesIdUploadPost`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | instance id of package |
Other parameters are passed through a pointer to a apiV1PackagesIdUploadPostRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
file | *os.File | The file to upload |
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HrefResponse V1PackagesPost(ctx).Package_(package_).Execute()
Create package
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yohan460/go-jamf-api/api"
)
func main() {
package_ := *openapiclient.NewPackage("Google Chrome", "my-package.pkg", "-1", int64(3), false, false, false, false, false, false, false) // Package | Package to be created
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PackagesAPI.V1PackagesPost(context.Background()).Package_(package_).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PackagesAPI.V1PackagesPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `V1PackagesPost`: HrefResponse
fmt.Fprintf(os.Stdout, "Response from `PackagesAPI.V1PackagesPost`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiV1PackagesPostRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
package_ | Package | Package to be created |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]