Skip to main content

MachineAccountMappingsAPI

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

MethodHTTP requestDescription
create-machine-account-mappingsPost /sources/{sourceId}/machine-account-mappingsCreate Machine Account Mappings
delete-machine-account-mappingsDelete /sources/{sourceId}/machine-account-mappingsDelete Source's Machine Account Mappings
list-machine-account-mappingsGet /sources/{sourceId}/machine-account-mappingsMachine Account Mapping for Source
set-machine-account-mappingsPut /sources/{sourceId}/machine-mappingsUpdate Source's Machine Account Mappings

create-machine-account-mappings

Create Machine Account Mappings Creates Machine Account Mappings for both identities and accounts for a source. A token with API, ORG_ADMIN, ROLE_ADMIN, ROLE_SUBADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API.

API Spec

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
idstringSource ID.

Other Parameters

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

NameTypeDescriptionNotes

attributeMappings | AttributeMappings | |

Return type

[]AttributeMappings

HTTP request headers

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

Example

package main

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

func main() {
id := `ef38f94347e94562b5bb8424a56397d8` // string | Source ID. # string | Source ID.
attributemappings := []byte(`{
"transformDefinition" : {
"attributes" : {
"input" : {
"attributes" : {
"name" : "8d3e0094e99445de98eef6c75e25jc04",
"attributeName" : "givenName",
"sourceName" : "delimited-src"
},
"type" : "accountAttribute"
}
},
"id" : "ToUpper",
"type" : "reference"
},
"target" : {
"sourceId" : "2c9180835d2e5168015d32f890ca1581",
"attributeName" : "businessApplication",
"type" : "IDENTITY"
}
}`) // AttributeMappings |

var attributeMappings v2024.AttributeMappings
if err := json.Unmarshal(attributemappings, &attributeMappings); err != nil {
fmt.Println("Error:", err)
return
}


configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.V2024.MachineAccountMappingsAPI.CreateMachineAccountMappings(context.Background(), id).AttributeMappings(attributeMappings).Execute()
//resp, r, err := apiClient.V2024.MachineAccountMappingsAPI.CreateMachineAccountMappings(context.Background(), id).AttributeMappings(attributeMappings).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachineAccountMappingsAPI.CreateMachineAccountMappings``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateMachineAccountMappings`: []AttributeMappings
fmt.Fprintf(os.Stdout, "Response from `MachineAccountMappingsAPI.CreateMachineAccountMappings`: %v\n", resp)
}

[Back to top]

delete-machine-account-mappings

Delete Source's Machine Account Mappings Use this API to remove machine account attribute mappings for a Source. A token with ORG_ADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API.

API Spec

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
idstringsource ID.

Other Parameters

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

NameTypeDescriptionNotes

Return type

(empty response body)

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 | source ID. # string | source ID.



configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
r, err := apiClient.V2024.MachineAccountMappingsAPI.DeleteMachineAccountMappings(context.Background(), id).Execute()
//r, err := apiClient.V2024.MachineAccountMappingsAPI.DeleteMachineAccountMappings(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachineAccountMappingsAPI.DeleteMachineAccountMappings``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}

}

[Back to top]

list-machine-account-mappings

Machine Account Mapping for Source Retrieves Machine account mappings for a specified source using Source ID.

API Spec

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
idstringSource ID

Other Parameters

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

NameTypeDescriptionNotes

limit | int32 | Max number of results to return. See V3 API Standard Collection Parameters for more information. | [default to 250] offset | int32 | Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information. | [default to 0]

Return type

[]AttributeMappings

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 | Source ID # string | Source ID
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)



configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.V2024.MachineAccountMappingsAPI.ListMachineAccountMappings(context.Background(), id).Execute()
//resp, r, err := apiClient.V2024.MachineAccountMappingsAPI.ListMachineAccountMappings(context.Background(), id).Limit(limit).Offset(offset).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachineAccountMappingsAPI.ListMachineAccountMappings``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListMachineAccountMappings`: []AttributeMappings
fmt.Fprintf(os.Stdout, "Response from `MachineAccountMappingsAPI.ListMachineAccountMappings`: %v\n", resp)
}

[Back to top]

set-machine-account-mappings

Update Source's Machine Account Mappings Use this API to update Machine Account Attribute Mapping for a Source. A token with ORG_ADMIN, SOURCE_ADMIN, or SOURCE_SUBADMIN authority is required to call this API.

API Spec

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
idstringSource ID.

Other Parameters

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

NameTypeDescriptionNotes

attributeMappings | AttributeMappings | |

Return type

[]AttributeMappings

HTTP request headers

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

Example

package main

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

func main() {
id := `ef38f94347e94562b5bb8424a56397d8` // string | Source ID. # string | Source ID.
attributemappings := []byte(`{
"transformDefinition" : {
"attributes" : {
"input" : {
"attributes" : {
"name" : "8d3e0094e99445de98eef6c75e25jc04",
"attributeName" : "givenName",
"sourceName" : "delimited-src"
},
"type" : "accountAttribute"
}
},
"id" : "ToUpper",
"type" : "reference"
},
"target" : {
"sourceId" : "2c9180835d2e5168015d32f890ca1581",
"attributeName" : "businessApplication",
"type" : "IDENTITY"
}
}`) // AttributeMappings |

var attributeMappings v2024.AttributeMappings
if err := json.Unmarshal(attributemappings, &attributeMappings); err != nil {
fmt.Println("Error:", err)
return
}


configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.V2024.MachineAccountMappingsAPI.SetMachineAccountMappings(context.Background(), id).AttributeMappings(attributeMappings).Execute()
//resp, r, err := apiClient.V2024.MachineAccountMappingsAPI.SetMachineAccountMappings(context.Background(), id).AttributeMappings(attributeMappings).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MachineAccountMappingsAPI.SetMachineAccountMappings``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SetMachineAccountMappings`: []AttributeMappings
fmt.Fprintf(os.Stdout, "Response from `MachineAccountMappingsAPI.SetMachineAccountMappings`: %v\n", resp)
}

[Back to top]