All URIs are relative to https://unit-tenant.instana.io
| Method | HTTP request | Description |
|---|---|---|
| create_team | POST /api/settings/rbac/teams | Create team |
| delete_team | DELETE /api/settings/rbac/teams/{id} | Delete team |
| get_team | GET /api/settings/rbac/teams/{id} | Get team by ID |
| get_team_role_mappings | GET /api/settings/rbac/teams/{teamId}/mappings | Get team role mappings |
| get_teams | GET /api/settings/rbac/teams | Get all teams |
| update_team | PUT /api/settings/rbac/teams/{id} | Update team |
create_team(api_team)
Create team
Create a new team.
- Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.models.api_team import ApiTeam
from instana_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://unit-tenant.instana.io
# See configuration.py for a list of all supported configuration parameters.
configuration = instana_client.Configuration(
host = "https://unit-tenant.instana.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with instana_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = instana_client.TeamsApi(api_client)
api_team = instana_client.ApiTeam() # ApiTeam | Team to create
try:
# Create team
api_instance.create_team(api_team)
except Exception as e:
print("Exception when calling TeamsApi->create_team: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| api_team | ApiTeam | Team to create |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | Team created successfully | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_team(id)
Delete team
Delete the team data.
- Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://unit-tenant.instana.io
# See configuration.py for a list of all supported configuration parameters.
configuration = instana_client.Configuration(
host = "https://unit-tenant.instana.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with instana_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = instana_client.TeamsApi(api_client)
id = 'teamId' # str | Id of the team to delete
try:
# Delete team
api_instance.delete_team(id)
except Exception as e:
print("Exception when calling TeamsApi->delete_team: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Id of the team to delete |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 0 | default response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiTeam get_team(id, include_team_usage=include_team_usage)
Get team by ID
Retrieve a specific team by its ID.
- Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.models.api_team import ApiTeam
from instana_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://unit-tenant.instana.io
# See configuration.py for a list of all supported configuration parameters.
configuration = instana_client.Configuration(
host = "https://unit-tenant.instana.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with instana_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = instana_client.TeamsApi(api_client)
id = 'teamId' # str | Id of the team for retrieval
include_team_usage = True # bool | (optional)
try:
# Get team by ID
api_response = api_instance.get_team(id, include_team_usage=include_team_usage)
print("The response of TeamsApi->get_team:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TeamsApi->get_team: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Id of the team for retrieval | |
| include_team_usage | bool | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successfully retrieved the team | - |
| 404 | Team not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[RoleMappingOverview] get_team_role_mappings(team_id)
Get team role mappings
Retrieve IdP role mappings applicable to a specific team
- Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.models.role_mapping_overview import RoleMappingOverview
from instana_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://unit-tenant.instana.io
# See configuration.py for a list of all supported configuration parameters.
configuration = instana_client.Configuration(
host = "https://unit-tenant.instana.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with instana_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = instana_client.TeamsApi(api_client)
team_id = 'team_id_example' # str |
try:
# Get team role mappings
api_response = api_instance.get_team_role_mappings(team_id)
print("The response of TeamsApi->get_team_role_mappings:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TeamsApi->get_team_role_mappings: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| team_id | str |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 404 | role mapping not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[ApiTeam] get_teams()
Get all teams
Retrieve all user teams for the current tenant unit.
- Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.models.api_team import ApiTeam
from instana_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://unit-tenant.instana.io
# See configuration.py for a list of all supported configuration parameters.
configuration = instana_client.Configuration(
host = "https://unit-tenant.instana.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with instana_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = instana_client.TeamsApi(api_client)
try:
# Get all teams
api_response = api_instance.get_teams()
print("The response of TeamsApi->get_teams:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TeamsApi->get_teams: %s\n" % e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 404 | No teams found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_team(id, api_team)
Update team
Update an existing team by ID.
- Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.models.api_team import ApiTeam
from instana_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://unit-tenant.instana.io
# See configuration.py for a list of all supported configuration parameters.
configuration = instana_client.Configuration(
host = "https://unit-tenant.instana.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with instana_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = instana_client.TeamsApi(api_client)
id = 'teamId' # str | Id of the team to update
api_team = {"id":"teamId","tag":"teamTag","info":{"description":"description for the team"},"scope":{"accessPermissions":["LIMITED_APPLICATIONS_SCOPE"],"actionFilter":"","applications":["applicationId1","applicationId2"],"restrictedApplicationFilter":{"restrictingApplicationId":"applicationId3","label":"demo","tagFilterExpression":{"type":"TAG_FILTER","name":"service.name","operator":"EQUALS","entity":"DESTINATION","value":"butler"},"scope":"INCLUDE_NO_DOWNSTREAM"}},"members":[{"userId":"userId","email":"username@example.com","name":"userName","roles":[{"roleId":"-3","roleName":"Default","viaIdP":false}]}],"entities":[]} # ApiTeam |
try:
# Update team
api_instance.update_team(id, api_team)
except Exception as e:
print("Exception when calling TeamsApi->update_team: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Id of the team to update | |
| api_team | ApiTeam |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | Team updated successfully | - |
| 400 | Bad Request | - |
| 404 | Team not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]