Skip to content

Latest commit

 

History

History
286 lines (178 loc) · 6.61 KB

LostModeAPI.md

File metadata and controls

286 lines (178 loc) · 6.61 KB

\LostModeAPI

All URIs are relative to https://<sub_domain>.api.kandji.io

Method HTTP request Description
DisableLostMode Post /api/v1/devices/{device_id}/action/disablelostmode Disable Lost Mode
EnableLostMode Post /api/v1/devices/{device_id}/action/enablelostmode Enable Lost Mode
PlayLostModeSound Post /api/v1/devices/{device_id}/action/playlostmodesound Play Lost Mode Sound
UpdateLocation Post /api/v1/devices/{device_id}/action/updatelocation Update Location

DisableLostMode

DisableLostMode(ctx, deviceId).Execute()

Disable Lost Mode

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/MScottBlake/kandji-go-sdk"
)

func main() {
	deviceId := "deviceId_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.LostModeAPI.DisableLostMode(context.Background(), deviceId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LostModeAPI.DisableLostMode``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
deviceId string

Other Parameters

Other parameters are passed through a pointer to a apiDisableLostModeRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

EnableLostMode

EnableLostMode(ctx, deviceId).Body(body).Execute()

Enable Lost Mode

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/MScottBlake/kandji-go-sdk"
)

func main() {
	deviceId := "deviceId_example" // string | 
	body := "body_example" // string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.LostModeAPI.EnableLostMode(context.Background(), deviceId).Body(body).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LostModeAPI.EnableLostMode``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
deviceId string

Other Parameters

Other parameters are passed through a pointer to a apiEnableLostModeRequest struct via the builder pattern

Name Type Description Notes

body | string | |

Return type

(empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PlayLostModeSound

PlayLostModeSound(ctx, deviceId).Execute()

Play Lost Mode Sound

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/MScottBlake/kandji-go-sdk"
)

func main() {
	deviceId := "deviceId_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.LostModeAPI.PlayLostModeSound(context.Background(), deviceId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LostModeAPI.PlayLostModeSound``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
deviceId string

Other Parameters

Other parameters are passed through a pointer to a apiPlayLostModeSoundRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateLocation

UpdateLocation(ctx, deviceId).Execute()

Update Location

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/MScottBlake/kandji-go-sdk"
)

func main() {
	deviceId := "deviceId_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.LostModeAPI.UpdateLocation(context.Background(), deviceId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LostModeAPI.UpdateLocation``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
deviceId string

Other Parameters

Other parameters are passed through a pointer to a apiUpdateLocationRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]