Python SDK error using sailpoint.beta.TaskManagementApi

Hi! I’m getting an error in trying to use the sailpoint.beta.TaskManagementApi.get_task_status_list() endpoint. It seems to me like the response the SDK gets back is not able to be parsed into the TaskStatus object:
3 validation errors for TaskStatus
parentName
Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
For further information visit Redirecting...
completionStatus
Value error, must be one of enum values (‘Success’, ‘Warning’, ‘Error’, ‘Terminated’, ‘TempError’) [type=value_error, input_value=‘SUCCESS’, input_type=str]
For further information visit Redirecting...
progress
Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
For further information visit Redirecting...

Basic code example:
CONFIG = Configuration()
BETA_CLIENT = sailpoint.beta.ApiClient(CONFIG)
BETA_TASK_MANAGEMENT_API = sailpoint.beta.TaskManagementApi(BETA_CLIENT)

taskStatusList = BETA_TASK_MANAGEMENT_API.get_task_status_list()

The exception gets thrown on the last line here. I’ve noticed it also gets thrown when using the “get by id” endpoint, and regardless of what filter I use in the “get_task_status_list()” method.

1 Like

I’m running into a similar issue attempting to use the v3 tagged objects API:

Code Snippet:

import sailpoint
import sailpoint.v3
import sailpoint.v3.models
from sailpoint.v3.models.bulk_tagged_object import BulkTaggedObject
from sailpoint.v3.models.tagged_object_dto import TaggedObjectDto

# Adds tag to passed in entitlements
def bulkAddTagToEntitlements(
      V3_TAGGED_OBJECTS_API: sailpoint.v3.TaggedObjectsApi,
      entitlements: list[sailpoint.v3.models.Entitlement],
      tag: str):
   bulkTaggedObject = BulkTaggedObject(tags=[tag], operation="MERGE", objectRefs=[])
   for entitlement in entitlements:
      bulkTaggedObject.object_refs.append(TaggedObjectDto(type='ENTITLEMENT', id=entitlement.id))
   try:
      V3_TAGGED_OBJECTS_API.set_tags_to_many_objects(bulk_tagged_object=bulkTaggedObject)
   except Exception as e:
      print("\tFailed to tag provided entitlements with tag {}; returned exception:\n{}".format(tag, e), file=sys.stderr)
      print("\tExiting script...")
      exit(1)

Nets me the below exception:

1 validation error for BulkTaggedObject
  Input should be a valid dictionary or instance of BulkTaggedObject [type=model_type, input_value=[{'objectRef': {'type': '...R', 'SQL_SERVER_PUAR']}], input_type=list]
    For further information visit https://errors.pydantic.dev/2.7/v/model_type

I really can’t think of how exactly the BulkTaggedObject I’m giving the endpoint is formatted badly. print(bulkTaggedObject) nets me this:

object_refs=[TaggedObjectDto(type='ENTITLEMENT', id='7e56eebed8024f7d967a8946ce1a80f6', name=None), TaggedObjectDto(type='ENTITLEMENT', id='a982555c297f4e7dbbc759b9d6263e27', name=None), TaggedObjectDto(type='ENTITLEMENT', id='a66431e35b34460fa48d7fd7c691a049', name=None), TaggedObjectDto(type='ENTITLEMENT', id='b95ecc768d7a49b0b1159774963040e2', name=None), TaggedObjectDto(type='ENTITLEMENT', id='fea32d06823f4741a7bd1408255c5dd0', name=None), TaggedObjectDto(type='ENTITLEMENT', id='a1bced530d9a4dd2aa482df920ad4ba4', name=None), TaggedObjectDto(type='ENTITLEMENT', id='5d9951b99c8c46acbf2f922bb8840437', name=None), TaggedObjectDto(type='ENTITLEMENT', id='7ddc51b0c56b41089d63b29dc981c703', name=None), TaggedObjectDto(type='ENTITLEMENT', id='6aa477b06e04416984aa66db753772ed', name=None), TaggedObjectDto(type='ENTITLEMENT', id='3620b4550e8446b1907a78a03f170466', name=None), TaggedObjectDto(type='ENTITLEMENT', id='2c9180876cde7c48016ce2c27c6e6959', name=None), TaggedObjectDto(type='ENTITLEMENT', id='2c9180876cde7c48016ce2c2b0266aac', name=None), TaggedObjectDto(type='ENTITLEMENT', id='2c9180876cde7c48016ce2c2c2066b1e', name=None), TaggedObjectDto(type='ENTITLEMENT', id='2c9180876cde7c48016ce2c50dd9787a', name=None), TaggedObjectDto(type='ENTITLEMENT', id='2c9180876cde7c48016ce2c51027788a', name=None), TaggedObjectDto(type='ENTITLEMENT', id='5d9951b99c8c46acbf2f922bb8840437', name=None), TaggedObjectDto(type='ENTITLEMENT', id='a1bced530d9a4dd2aa482df920ad4ba4', name=None), TaggedObjectDto(type='ENTITLEMENT', id='c585bd1955514a7786d14bfd98d2d220', name=None), TaggedObjectDto(type='ENTITLEMENT', id='41dbb5fcc10148a4a57866ccd300075a', name=None), TaggedObjectDto(type='ENTITLEMENT', id='2c9180876cde7c48016ce2c2c2066b1e', name=None), TaggedObjectDto(type='ENTITLEMENT', id='2c91808574a28a1b0174a537d58e07b2', name=None)] tags=['WINDOWS_LOCAL_PUAR'] operation='MERGE'

The exact same request body worked when I would use a standard dictionary object to make this request in code in the past.

I’ve continued to look into this and have provided additional updates on the SDK Issues post I opened up, here: