Skip to main content

sailpoint.machine_identities_lifecycle_actions.MachineIdentityLifecycleActionsApi

Use this API to implement machine identity lifecycle action functionality. With this functionality in place, administrators and machine identity owners can activate or deactivate machine identities, track the approval and provisioning status of each request, and cancel requests before provisioning starts.

A lifecycle action is a request to change whether a machine identity is active. For example, an administrator may deactivate an agent while a security review is in progress, and then activate it again once the review is complete.

Lifecycle actions are currently supported only for machine identities of type Agent.

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

MethodHTTP requestDescription
cancel-machine-identity-lifecycle-action-v1POST /machine-identities/v1/lifecycle-actions/{requestId}/cancelCancel machine identity lifecycle action
get-machine-identity-lifecycle-action-v1GET /machine-identities/v1/lifecycle-actions/{requestId}Get machine identity lifecycle action
list-machine-identity-lifecycle-actions-v1GET /machine-identities/v1/lifecycle-actionsList machine identity lifecycle actions
submit-machine-identity-lifecycle-action-v1POST /machine-identities/v1/{id}/lifecycle-actionsSubmit machine identity lifecycle action

cancel-machine-identity-lifecycle-action-v1​

experimental

This API is currently in an experimental state. The API is subject to change based on feedback and further testing. You must include the X-SailPoint-Experimental header and set it to true to use this endpoint.

setting x-sailpoint-experimental header

on the configuration object you can set the x-sailpoint-experimental header to `true' to enable all experimantl endpoints within the SDK. Example:

configuration = Configuration()
configuration.experimental = True

Cancel machine identity lifecycle action Cancels a lifecycle action request that hasn't started provisioning yet. When the cancel is accepted, the request moves to CANCELING status.

A request can't be canceled once provisioning has started, after it has finished, or while a cancel is already in progress.

The request body is optional. Use it to add a comment explaining why the request was canceled.

You can always cancel requests that you submitted. To cancel a request that someone else submitted, you need the idn:machine-identity:lifecycle-action right and admin or owner access to the machine identity. Admin or owner access means you're an org admin, a source admin, a source sub-admin for the machine identity's source, or the machine identity's owner.

If the cancel can't be completed, the API returns an error and the request stays in CANCELING status.

API Spec

Parameters​

Param TypeNameData TypeRequiredDescription
Pathrequest_idstrTrueLifecycle request identifier.
x_sail_point_experimentalstr(optional) (default to 'true')Use this header to enable this experimental API.
Bodycancel_lifecycle_action_requestCancelLifecycleActionRequest(optional)

Return type​

CancelLifecycleActionResponse

Responses​

CodeDescriptionData TypeResponse headers
202Accepted. The lifecycle request cancel was accepted.CancelLifecycleActionResponse-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.SubmitMachineIdentityLifecycleActionV1401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
404Not Found - returned if the request URL refers to a resource or object that does not existErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.SubmitMachineIdentityLifecycleActionV1429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers​

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

Example​

from sailpoint.machine_identities_lifecycle_actions.api.machine_identity_lifecycle_actions_api import MachineIdentityLifecycleActionsApi
from sailpoint.machine_identities_lifecycle_actions.api_client import ApiClient
from sailpoint.machine_identities_lifecycle_actions.models.cancel_lifecycle_action_request import CancelLifecycleActionRequest
from sailpoint.machine_identities_lifecycle_actions.models.cancel_lifecycle_action_response import CancelLifecycleActionResponse
from sailpoint.configuration import Configuration
configuration = Configuration()

configuration.experimental = True

with ApiClient(configuration) as api_client:
request_id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890' # str | Lifecycle request identifier. # str | Lifecycle request identifier.
x_sail_point_experimental = 'true' # str | Use this header to enable this experimental API. (optional) (default to 'true') # str | Use this header to enable this experimental API. (optional) (default to 'true')
cancel_lifecycle_action_request = '''{
"comment" : "Cancelling - will resubmit after maintenance window"
}''' # CancelLifecycleActionRequest | (optional)

try:
# Cancel machine identity lifecycle action

results = MachineIdentityLifecycleActionsApi(api_client).cancel_machine_identity_lifecycle_action_v1(request_id=request_id)
# Below is a request that includes all optional parameters
# results = MachineIdentityLifecycleActionsApi(api_client).cancel_machine_identity_lifecycle_action_v1(request_id, x_sail_point_experimental, new_cancel_lifecycle_action_request)
print("The response of MachineIdentityLifecycleActionsApi->cancel_machine_identity_lifecycle_action_v1:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling MachineIdentityLifecycleActionsApi->cancel_machine_identity_lifecycle_action_v1: %s\n" % e)

[Back to top]

get-machine-identity-lifecycle-action-v1​

experimental

This API is currently in an experimental state. The API is subject to change based on feedback and further testing. You must include the X-SailPoint-Experimental header and set it to true to use this endpoint.

setting x-sailpoint-experimental header

on the configuration object you can set the x-sailpoint-experimental header to `true' to enable all experimantl endpoints within the SDK. Example:

configuration = Configuration()
configuration.experimental = True

Get machine identity lifecycle action Returns a single lifecycle action request, including its current status, approval details, and provisioning progress. Use it to follow a request after you submit or cancel it.

You can always view requests that you submitted. To view a request that someone else submitted, you need the idn:machine-identity:lifecycle-action right and admin or owner access to the machine identity. Admin or owner access means you're an org admin, a source admin, a source sub-admin for the machine identity's source, or the machine identity's owner.

API Spec

Parameters​

Param TypeNameData TypeRequiredDescription
Pathrequest_idstrTrueLifecycle request identifier.
x_sail_point_experimentalstr(optional) (default to 'true')Use this header to enable this experimental API.

Return type​

LifecycleActionRequest

Responses​

CodeDescriptionData TypeResponse headers
200The lifecycle action request.LifecycleActionRequest-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.SubmitMachineIdentityLifecycleActionV1401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
404Not Found - returned if the request URL refers to a resource or object that does not existErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.SubmitMachineIdentityLifecycleActionV1429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers​

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

Example​

from sailpoint.machine_identities_lifecycle_actions.api.machine_identity_lifecycle_actions_api import MachineIdentityLifecycleActionsApi
from sailpoint.machine_identities_lifecycle_actions.api_client import ApiClient
from sailpoint.machine_identities_lifecycle_actions.models.lifecycle_action_request import LifecycleActionRequest
from sailpoint.configuration import Configuration
configuration = Configuration()

configuration.experimental = True

with ApiClient(configuration) as api_client:
request_id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890' # str | Lifecycle request identifier. # str | Lifecycle request identifier.
x_sail_point_experimental = 'true' # str | Use this header to enable this experimental API. (optional) (default to 'true') # str | Use this header to enable this experimental API. (optional) (default to 'true')

try:
# Get machine identity lifecycle action

results = MachineIdentityLifecycleActionsApi(api_client).get_machine_identity_lifecycle_action_v1(request_id=request_id)
# Below is a request that includes all optional parameters
# results = MachineIdentityLifecycleActionsApi(api_client).get_machine_identity_lifecycle_action_v1(request_id, x_sail_point_experimental)
print("The response of MachineIdentityLifecycleActionsApi->get_machine_identity_lifecycle_action_v1:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling MachineIdentityLifecycleActionsApi->get_machine_identity_lifecycle_action_v1: %s\n" % e)

[Back to top]

list-machine-identity-lifecycle-actions-v1​

experimental

This API is currently in an experimental state. The API is subject to change based on feedback and further testing. You must include the X-SailPoint-Experimental header and set it to true to use this endpoint.

setting x-sailpoint-experimental header

on the configuration object you can set the x-sailpoint-experimental header to `true' to enable all experimantl endpoints within the SDK. Example:

configuration = Configuration()
configuration.experimental = True

List machine identity lifecycle actions Returns the lifecycle action requests that you submitted. Requests that other users submitted aren't included, even if you're an admin. If the call isn't made on behalf of an identity, the list is empty.

When limit is omitted, up to 50 results are returned.

API Spec

Parameters​

Param TypeNameData TypeRequiredDescription
Queryfiltersstr(optional)Filter results using the standard syntax described in API Standard Collection Parameters Filtering is supported for the following fields and operators: resourceType: eq, in operationType: eq, in status: eq, in completed: eq targetId: eq targetName: eq, sw sourceId: eq created: gt, ge, lt, le The resourceType filter matches the targetType field in the response.
Querysortersstr(optional) (default to '-created')Sort results using the standard syntax described in API Standard Collection Parameters Sorting is supported for the following fields: created, modified, status Default sort is -created (newest first).
Querylimitint(optional) (default to 50)Max number of results to return. When omitted, the default limit is 50. The maximum allowed limit is 250. See API Standard Collection Parameters for more information.
Queryoffsetint(optional) (default to 0)Offset into the full result set. Usually specified with limit to paginate through the results. See API Standard Collection Parameters for more information.
Querycountbool(optional) (default to False)If true it will populate the X-Total-Count response header with the number of results that would be returned if limit and offset were ignored. Since requesting a total count can have a performance impact, it is recommended not to send count=true if that value will not be used. See API Standard Collection Parameters for more information.
x_sail_point_experimentalstr(optional) (default to 'true')Use this header to enable this experimental API.

Return type​

List[LifecycleActionRequest]

Responses​

CodeDescriptionData TypeResponse headers
200Lifecycle action requests that you submitted.List[LifecycleActionRequest]* X-Total-Count - The total result count (returned when count=true is passed). * Cache-Control - How long the client can cache the response.
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.SubmitMachineIdentityLifecycleActionV1401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.SubmitMachineIdentityLifecycleActionV1429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers​

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

Example​

from sailpoint.machine_identities_lifecycle_actions.api.machine_identity_lifecycle_actions_api import MachineIdentityLifecycleActionsApi
from sailpoint.machine_identities_lifecycle_actions.api_client import ApiClient
from sailpoint.machine_identities_lifecycle_actions.models.lifecycle_action_request import LifecycleActionRequest
from sailpoint.configuration import Configuration
configuration = Configuration()

configuration.experimental = True

with ApiClient(configuration) as api_client:
filters = 'status in (\"RECEIVED\",\"COMPLETED\")' # str | Filter results using the standard syntax described in [API Standard Collection Parameters](https://developer.sailpoint.com/docs/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **resourceType**: *eq, in* **operationType**: *eq, in* **status**: *eq, in* **completed**: *eq* **targetId**: *eq* **targetName**: *eq, sw* **sourceId**: *eq* **created**: *gt, ge, lt, le* The `resourceType` filter matches the `targetType` field in the response. (optional) # str | Filter results using the standard syntax described in [API Standard Collection Parameters](https://developer.sailpoint.com/docs/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **resourceType**: *eq, in* **operationType**: *eq, in* **status**: *eq, in* **completed**: *eq* **targetId**: *eq* **targetName**: *eq, sw* **sourceId**: *eq* **created**: *gt, ge, lt, le* The `resourceType` filter matches the `targetType` field in the response. (optional)
sorters = '-created' # str | Sort results using the standard syntax described in [API Standard Collection Parameters](https://developer.sailpoint.com/docs/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created, modified, status** Default sort is **-created** (newest first). (optional) (default to '-created') # str | Sort results using the standard syntax described in [API Standard Collection Parameters](https://developer.sailpoint.com/docs/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created, modified, status** Default sort is **-created** (newest first). (optional) (default to '-created')
limit = 50 # int | Max number of results to return. When omitted, the default limit is 50. The maximum allowed limit is 250. See [API Standard Collection Parameters](https://developer.sailpoint.com/docs/api/standard-collection-parameters) for more information. (optional) (default to 50) # int | Max number of results to return. When omitted, the default limit is 50. The maximum allowed limit is 250. See [API Standard Collection Parameters](https://developer.sailpoint.com/docs/api/standard-collection-parameters) for more information. (optional) (default to 50)
offset = 0 # int | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [API Standard Collection Parameters](https://developer.sailpoint.com/docs/api/standard-collection-parameters) for more information. (optional) (default to 0) # int | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [API Standard Collection Parameters](https://developer.sailpoint.com/docs/api/standard-collection-parameters) for more information. (optional) (default to 0)
count = False # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [API Standard Collection Parameters](https://developer.sailpoint.com/docs/api/standard-collection-parameters) for more information. (optional) (default to False) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [API Standard Collection Parameters](https://developer.sailpoint.com/docs/api/standard-collection-parameters) for more information. (optional) (default to False)
x_sail_point_experimental = 'true' # str | Use this header to enable this experimental API. (optional) (default to 'true') # str | Use this header to enable this experimental API. (optional) (default to 'true')

try:
# List machine identity lifecycle actions

results = MachineIdentityLifecycleActionsApi(api_client).list_machine_identity_lifecycle_actions_v1()
# Below is a request that includes all optional parameters
# results = MachineIdentityLifecycleActionsApi(api_client).list_machine_identity_lifecycle_actions_v1(filters, sorters, limit, offset, count, x_sail_point_experimental)
print("The response of MachineIdentityLifecycleActionsApi->list_machine_identity_lifecycle_actions_v1:\n")
for item in results:
print(item.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling MachineIdentityLifecycleActionsApi->list_machine_identity_lifecycle_actions_v1: %s\n" % e)

[Back to top]

submit-machine-identity-lifecycle-action-v1​

experimental

This API is currently in an experimental state. The API is subject to change based on feedback and further testing. You must include the X-SailPoint-Experimental header and set it to true to use this endpoint.

setting x-sailpoint-experimental header

on the configuration object you can set the x-sailpoint-experimental header to `true' to enable all experimantl endpoints within the SDK. Example:

configuration = Configuration()
configuration.experimental = True

Submit machine identity lifecycle action Submits a request to activate or deactivate a machine identity. Supported actions are ACTIVATE and DEACTIVATE.

Note: Lifecycle actions are currently supported only for machine identities of type Agent.

The response includes a requestId. Use it to get the request or cancel it. To see all the requests you've submitted, use list machine identity lifecycle actions.

Only one lifecycle action can be in progress for a machine identity at a time. If another action is already in progress for the machine identity, the request is rejected.

To submit a lifecycle action, you need the idn:machine-identity:lifecycle-action right, or admin or owner access to the machine identity. Admin or owner access means you're an org admin, a source admin, a source sub-admin for the machine identity's source, or the machine identity's owner.

API Spec

Parameters​

Param TypeNameData TypeRequiredDescription
PathidstrTrueMachine identity ID.
Bodylifecycle_action_submit_requestLifecycleActionSubmitRequestTrue
x_sail_point_experimentalstr(optional) (default to 'true')Use this header to enable this experimental API.

Return type​

LifecycleActionSubmitResponse

Responses​

CodeDescriptionData TypeResponse headers
202Accepted. The lifecycle request was created.LifecycleActionSubmitResponse-
400Client Error - Returned if the request body is invalid.ErrorResponseDto-
401Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.SubmitMachineIdentityLifecycleActionV1401Response-
403Forbidden - Returned if the user you are running as, doesn't have access to this end-point.ErrorResponseDto-
404Not Found - returned if the request URL refers to a resource or object that does not existErrorResponseDto-
429Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.SubmitMachineIdentityLifecycleActionV1429Response-
500Internal Server Error - Returned if there is an unexpected error.ErrorResponseDto-

HTTP request headers​

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

Example​

from sailpoint.machine_identities_lifecycle_actions.api.machine_identity_lifecycle_actions_api import MachineIdentityLifecycleActionsApi
from sailpoint.machine_identities_lifecycle_actions.api_client import ApiClient
from sailpoint.machine_identities_lifecycle_actions.models.lifecycle_action_submit_request import LifecycleActionSubmitRequest
from sailpoint.machine_identities_lifecycle_actions.models.lifecycle_action_submit_response import LifecycleActionSubmitResponse
from sailpoint.configuration import Configuration
configuration = Configuration()

configuration.experimental = True

with ApiClient(configuration) as api_client:
id = '1c9c8e1f-2f5f-4f77-9f7e-5d37e4fb3ef0' # str | Machine identity ID. # str | Machine identity ID.
lifecycle_action_submit_request = '''{
"comments" : [ {
"comment" : "Suspending agent until security review completes"
}, {
"comment" : "Suspending agent until security review completes"
}, {
"comment" : "Suspending agent until security review completes"
}, {
"comment" : "Suspending agent until security review completes"
}, {
"comment" : "Suspending agent until security review completes"
} ],
"action" : "DEACTIVATE"
}''' # LifecycleActionSubmitRequest |
x_sail_point_experimental = 'true' # str | Use this header to enable this experimental API. (optional) (default to 'true') # str | Use this header to enable this experimental API. (optional) (default to 'true')

try:
# Submit machine identity lifecycle action
new_lifecycle_action_submit_request = LifecycleActionSubmitRequest.from_json(lifecycle_action_submit_request)
results = MachineIdentityLifecycleActionsApi(api_client).submit_machine_identity_lifecycle_action_v1(id=id, lifecycle_action_submit_request=new_lifecycle_action_submit_request)
# Below is a request that includes all optional parameters
# results = MachineIdentityLifecycleActionsApi(api_client).submit_machine_identity_lifecycle_action_v1(id, new_lifecycle_action_submit_request, x_sail_point_experimental)
print("The response of MachineIdentityLifecycleActionsApi->submit_machine_identity_lifecycle_action_v1:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling MachineIdentityLifecycleActionsApi->submit_machine_identity_lifecycle_action_v1: %s\n" % e)

[Back to top]