Files
developer.sailpoint.com/docs/tools/sdk/go/Reference/V2025/Methods/MachineAccountClassifyAPI.md
2025-06-16 14:28:43 +00:00

4.1 KiB

id, title, pagination_label, sidebar_label, sidebar_class_name, keywords, slug, tags
id title pagination_label sidebar_label sidebar_class_name keywords slug tags
v2025-machine-account-classify MachineAccountClassify MachineAccountClassify MachineAccountClassify gosdk
go
Golang
sdk
MachineAccountClassify
V2025MachineAccountClassify
/tools/sdk/go/v2025/methods/machine-account-classify
SDK
Software Development Kit
MachineAccountClassify
V2025MachineAccountClassify

MachineAccountClassifyAPI

All URIs are relative to https://sailpoint.api.identitynow.com/v2025

Method HTTP request Description
send-classify-machine-account Post /accounts/{id}/classify Classify a Single Machine Account

send-classify-machine-account

Classify a Single Machine Account Use this API to classify a single machine account. A token with API, ORG_ADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API.

API Spec

Path Parameters

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

Other Parameters

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

Name Type Description Notes

classificationMode | string | Specifies how the accounts should be classified. default - uses criteria to classify account as machine or human, excludes accounts that were manually classified. ignoreManual - like default, but includes accounts that were manually classified. forceMachine - forces account to be classified as machine. forceHuman - forces account to be classified as human. | [default to "default"]

Return type

SendClassifyMachineAccount200Response

HTTP request headers

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

Example

package main

import (
	"context"
	"fmt"
	"os"
  
    
	sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
    id := `ef38f94347e94562b5bb8424a56397d8` // string | Account ID. # string | Account ID.
    classificationMode := `forceMachine` // string | Specifies how the accounts should be classified.        default - uses criteria to classify account as machine or human, excludes accounts that were manually classified.       ignoreManual - like default, but includes accounts that were manually classified.       forceMachine - forces account to be classified as machine.       forceHuman - forces account to be classified as human. (optional) (default to "default") # string | Specifies how the accounts should be classified.        default - uses criteria to classify account as machine or human, excludes accounts that were manually classified.       ignoreManual - like default, but includes accounts that were manually classified.       forceMachine - forces account to be classified as machine.       forceHuman - forces account to be classified as human. (optional) (default to "default")

    

    configuration := sailpoint.NewDefaultConfiguration()
    apiClient := sailpoint.NewAPIClient(configuration)
    resp, r, err := apiClient.V2025.MachineAccountClassifyAPI.SendClassifyMachineAccount(context.Background(), id).Execute()
	  //resp, r, err := apiClient.V2025.MachineAccountClassifyAPI.SendClassifyMachineAccount(context.Background(), id).ClassificationMode(classificationMode).Execute()
    if err != nil {
	    fmt.Fprintf(os.Stderr, "Error when calling `MachineAccountClassifyAPI.SendClassifyMachineAccount``: %v\n", err)
	    fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `SendClassifyMachineAccount`: SendClassifyMachineAccount200Response
    fmt.Fprintf(os.Stdout, "Response from `MachineAccountClassifyAPI.SendClassifyMachineAccount`: %v\n", resp)
}

[Back to top]