mirror of
https://github.com/LukeHagar/developer.sailpoint.com.git
synced 2025-12-08 20:37:46 +00:00
Update to python SDK docs: 13820107626
This commit is contained in:
@@ -96,7 +96,6 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v3
|
||||
from sailpoint.v3.api.roles_api import RolesApi
|
||||
from sailpoint.v3.api_client import ApiClient
|
||||
from sailpoint.v3.models.role import Role
|
||||
@@ -104,8 +103,9 @@ from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
role = {
|
||||
role = '''{
|
||||
"owner" : {
|
||||
"name" : "support",
|
||||
"id" : "2c9180a46faadee4016fb4e018c20639",
|
||||
@@ -262,18 +262,17 @@ with ApiClient(configuration) as api_client:
|
||||
},
|
||||
"id" : "2c918086749d78830174a1a40e121518",
|
||||
"requestable" : true
|
||||
} # Role |
|
||||
}''' # Role |
|
||||
|
||||
try:
|
||||
# Create a Role
|
||||
new_role = Role()
|
||||
new_role.from_json(role)
|
||||
results =RolesApi(api_client).create_role(new_role)
|
||||
new_role = Role.from_json(role)
|
||||
results = RolesApi(api_client).create_role(role=new_role)
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = RolesApi(api_client).create_role(new_role)
|
||||
print("The response of RolesApi->create_role:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling RolesApi->create_role: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -316,7 +315,6 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v3
|
||||
from sailpoint.v3.api.roles_api import RolesApi
|
||||
from sailpoint.v3.api_client import ApiClient
|
||||
from sailpoint.v3.models.role_bulk_delete_request import RoleBulkDeleteRequest
|
||||
@@ -325,21 +323,21 @@ from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
role_bulk_delete_request = {
|
||||
role_bulk_delete_request = '''{
|
||||
"roleIds" : [ "2c9180847812e0b1017817051919ecca", "2c9180887812e0b201781e129f151816" ]
|
||||
} # RoleBulkDeleteRequest |
|
||||
}''' # RoleBulkDeleteRequest |
|
||||
|
||||
try:
|
||||
# Delete Role(s)
|
||||
new_role_bulk_delete_request = RoleBulkDeleteRequest()
|
||||
new_role_bulk_delete_request.from_json(role_bulk_delete_request)
|
||||
results =RolesApi(api_client).delete_bulk_roles(new_role_bulk_delete_request)
|
||||
new_role_bulk_delete_request = RoleBulkDeleteRequest.from_json(role_bulk_delete_request)
|
||||
results = RolesApi(api_client).delete_bulk_roles(role_bulk_delete_request=new_role_bulk_delete_request)
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = RolesApi(api_client).delete_bulk_roles(new_role_bulk_delete_request)
|
||||
print("The response of RolesApi->delete_bulk_roles:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling RolesApi->delete_bulk_roles: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -381,23 +379,23 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v3
|
||||
from sailpoint.v3.api.roles_api import RolesApi
|
||||
from sailpoint.v3.api_client import ApiClient
|
||||
from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
id = '2c91808a7813090a017814121e121518' # str | ID of the Role # str | ID of the Role
|
||||
|
||||
try:
|
||||
# Delete a Role
|
||||
|
||||
RolesApi(api_client).delete_role(id)
|
||||
RolesApi(api_client).delete_role(id=id)
|
||||
# Below is a request that includes all optional parameters
|
||||
# RolesApi(api_client).delete_role(id)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling RolesApi->delete_role: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -438,7 +436,6 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v3
|
||||
from sailpoint.v3.api.roles_api import RolesApi
|
||||
from sailpoint.v3.api_client import ApiClient
|
||||
from sailpoint.v3.models.role import Role
|
||||
@@ -446,18 +443,19 @@ from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
id = '2c91808a7813090a017814121e121518' # str | ID of the Role # str | ID of the Role
|
||||
|
||||
try:
|
||||
# Get a Role
|
||||
|
||||
results =RolesApi(api_client).get_role(id)
|
||||
results = RolesApi(api_client).get_role(id=id)
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = RolesApi(api_client).get_role(id)
|
||||
print("The response of RolesApi->get_role:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling RolesApi->get_role: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -502,7 +500,6 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v3
|
||||
from sailpoint.v3.api.roles_api import RolesApi
|
||||
from sailpoint.v3.api_client import ApiClient
|
||||
from sailpoint.v3.models.role_identity import RoleIdentity
|
||||
@@ -510,6 +507,7 @@ from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
id = '2c91808a7813090a017814121e121518' # str | ID of the Role for which the assigned Identities are to be listed # str | ID of the Role for which the assigned Identities are to be listed
|
||||
limit = 250 # int | 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) # int | 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)
|
||||
@@ -521,12 +519,12 @@ with ApiClient(configuration) as api_client:
|
||||
try:
|
||||
# List Identities assigned a Role
|
||||
|
||||
results =RolesApi(api_client).get_role_assigned_identities(id, )
|
||||
results = RolesApi(api_client).get_role_assigned_identities(id=id)
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = RolesApi(api_client).get_role_assigned_identities(id, limit, offset, count, filters, sorters)
|
||||
print("The response of RolesApi->get_role_assigned_identities:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling RolesApi->get_role_assigned_identities: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -573,7 +571,6 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v3
|
||||
from sailpoint.v3.api.roles_api import RolesApi
|
||||
from sailpoint.v3.api_client import ApiClient
|
||||
from sailpoint.v3.models.role import Role
|
||||
@@ -581,6 +578,7 @@ from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
for_subadmin = '5168015d32f890ca15812c9180835d2e' # str | If provided, filters the returned list according to what is visible to the indicated ROLE_SUBADMIN Identity. The value of the parameter is either an Identity ID, or the special value **me**, which is shorthand for the calling Identity's ID. A 400 Bad Request error is returned if the **for-subadmin** parameter is specified for an Identity that is not a subadmin. (optional) # str | If provided, filters the returned list according to what is visible to the indicated ROLE_SUBADMIN Identity. The value of the parameter is either an Identity ID, or the special value **me**, which is shorthand for the calling Identity's ID. A 400 Bad Request error is returned if the **for-subadmin** parameter is specified for an Identity that is not a subadmin. (optional)
|
||||
limit = 50 # int | Note that for this API the maximum value for limit is 50. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 50) # int | Note that for this API the maximum value for limit is 50. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 50)
|
||||
@@ -594,12 +592,12 @@ with ApiClient(configuration) as api_client:
|
||||
try:
|
||||
# List Roles
|
||||
|
||||
results =RolesApi(api_client).list_roles()
|
||||
results = RolesApi(api_client).list_roles()
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = RolesApi(api_client).list_roles(for_subadmin, limit, offset, count, filters, sorters, for_segment_ids, include_unsegmented)
|
||||
print("The response of RolesApi->list_roles:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling RolesApi->list_roles: %s\n" % e)
|
||||
```
|
||||
|
||||
@@ -659,7 +657,6 @@ Code | Description | Data Type | Response headers |
|
||||
### Example
|
||||
|
||||
```python
|
||||
import sailpoint.v3
|
||||
from sailpoint.v3.api.roles_api import RolesApi
|
||||
from sailpoint.v3.api_client import ApiClient
|
||||
from sailpoint.v3.models.json_patch_operation import JsonPatchOperation
|
||||
@@ -668,26 +665,20 @@ from pprint import pprint
|
||||
from sailpoint.configuration import Configuration
|
||||
configuration = Configuration()
|
||||
|
||||
|
||||
with ApiClient(configuration) as api_client:
|
||||
id = '2c91808a7813090a017814121e121518' # str | ID of the Role to patch # str | ID of the Role to patch
|
||||
[{op=replace, path=/requestable, value=true}, {op=replace, path=/enabled, value=true}] # List[JsonPatchOperation] |
|
||||
json_patch_operation = {
|
||||
"op" : "replace",
|
||||
"path" : "/description",
|
||||
"value" : "New description"
|
||||
} # List[JsonPatchOperation] |
|
||||
|
||||
json_patch_operation = '''[{op=replace, path=/requestable, value=true}, {op=replace, path=/enabled, value=true}]''' # List[JsonPatchOperation] |
|
||||
|
||||
try:
|
||||
# Patch a specified Role
|
||||
new_json_patch_operation = JsonPatchOperation()
|
||||
new_json_patch_operation.from_json(json_patch_operation)
|
||||
results =RolesApi(api_client).patch_role(id, new_json_patch_operation)
|
||||
new_json_patch_operation = JsonPatchOperation.from_json(json_patch_operation)
|
||||
results = RolesApi(api_client).patch_role(id=id, json_patch_operation=new_json_patch_operation)
|
||||
# Below is a request that includes all optional parameters
|
||||
# results = RolesApi(api_client).patch_role(id, new_json_patch_operation)
|
||||
print("The response of RolesApi->patch_role:\n")
|
||||
pprint(results)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
print("Exception when calling RolesApi->patch_role: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user