Skip to content

Latest commit

 

History

History
1048 lines (703 loc) · 31.5 KB

TeamsApi.md

File metadata and controls

1048 lines (703 loc) · 31.5 KB

instana_client.TeamsApi

All URIs are relative to https://unit-tenant.instana.io

Method HTTP request Description
create_mapping POST /api/settings/rbac/mappings Create mapping
create_team POST /api/settings/rbac/teams Create team
delete_mapping DELETE /api/settings/rbac/mappings/{id} Delete mapping
delete_team DELETE /api/settings/rbac/teams/{id} Delete team
get_identity_provider_patch GET /api/settings/rbac/mappings/identityProvider/restrictEmptyIdpGroups Check user restrictions for empty Idp mapping
get_mapping GET /api/settings/rbac/mappings/{id} Get mapping
get_mappings GET /api/settings/rbac/mappings Get all mappings
get_mappings_overview GET /api/settings/rbac/mappings/overview Get all mappings overview
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_mapping PUT /api/settings/rbac/mappings/{id} Update mapping
update_team PUT /api/settings/rbac/teams/{id} Update team

create_mapping

Mapping create_mapping(mapping)

Create mapping

For more information on groups please access the https://developer.ibm.com/apis/catalog/instana--instana-rest-api/Settings#groups.

Example

  • Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.models.mapping import Mapping
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)
    mapping = {"id":"mappingId","key":"roles","value":"analyst","groupId":"-3","teamId":null} # Mapping | 

    try:
        # Create mapping
        api_response = api_instance.create_mapping(mapping)
        print("The response of TeamsApi->create_mapping:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TeamsApi->create_mapping: %s\n" % e)

Parameters

Name Type Description Notes
mapping Mapping

Return type

Mapping

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
412 Attempting to upsert a mapping containing a teamId - without teams being available -
422 invalid request body -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_team

create_team(api_team)

Create team

Create a new team.

Example

  • 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)

Parameters

Name Type Description Notes
api_team ApiTeam Team to create

Return type

void (empty response body)

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Team created successfully -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_mapping

delete_mapping(id)

Delete mapping

For more information on groups please access the https://developer.ibm.com/apis/catalog/instana--instana-rest-api/Settings#groups.

Example

  • 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 = 'mappingId' # str | Id of the mapping to delete

    try:
        # Delete mapping
        api_instance.delete_mapping(id)
    except Exception as e:
        print("Exception when calling TeamsApi->delete_mapping: %s\n" % e)

Parameters

Name Type Description Notes
id str Id of the mapping to delete

Return type

void (empty response body)

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
0 default response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_team

delete_team(id)

Delete team

Delete the team data.

Example

  • 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)

Parameters

Name Type Description Notes
id str Id of the team to delete

Return type

void (empty response body)

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
0 default response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_identity_provider_patch

IdentityProviderPatch get_identity_provider_patch()

Check user restrictions for empty Idp mapping

For more information on groups please access the https://developer.ibm.com/apis/catalog/instana--instana-rest-api/Settings#groups.

Example

  • Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.models.identity_provider_patch import IdentityProviderPatch
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:
        # Check user restrictions for empty Idp mapping
        api_response = api_instance.get_identity_provider_patch()
        print("The response of TeamsApi->get_identity_provider_patch:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TeamsApi->get_identity_provider_patch: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

IdentityProviderPatch

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
404 No mapping restriction found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_mapping

Mapping get_mapping(id)

Get mapping

For more information on groups please access the https://developer.ibm.com/apis/catalog/instana--instana-rest-api/Settings#groups.

Example

  • Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.models.mapping import Mapping
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 = 'id_example' # str | 

    try:
        # Get mapping
        api_response = api_instance.get_mapping(id)
        print("The response of TeamsApi->get_mapping:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TeamsApi->get_mapping: %s\n" % e)

Parameters

Name Type Description Notes
id str

Return type

Mapping

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
404 No mapping found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_mappings

List[Mapping] get_mappings()

Get all mappings

For more information on groups please access the https://developer.ibm.com/apis/catalog/instana--instana-rest-api/Settings#groups.

Example

  • Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.models.mapping import Mapping
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 mappings
        api_response = api_instance.get_mappings()
        print("The response of TeamsApi->get_mappings:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TeamsApi->get_mappings: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[Mapping]

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
404 No mapping found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_mappings_overview

List[MappingOverview] get_mappings_overview()

Get all mappings overview

For more information on groups please access the https://developer.ibm.com/apis/catalog/instana--instana-rest-api/Settings#groups.

Example

  • Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.models.mapping_overview import MappingOverview
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 mappings overview
        api_response = api_instance.get_mappings_overview()
        print("The response of TeamsApi->get_mappings_overview:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TeamsApi->get_mappings_overview: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[MappingOverview]

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
404 No group mapping overviews found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_team

ApiTeam get_team(id, include_team_usage=include_team_usage)

Get team by ID

Retrieve a specific team by its ID.

Example

  • 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)

Parameters

Name Type Description Notes
id str Id of the team for retrieval
include_team_usage bool [optional]

Return type

ApiTeam

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

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]

get_team_role_mappings

List[RoleMappingOverview] get_team_role_mappings(team_id)

Get team role mappings

Retrieve IdP role mappings applicable to a specific team

Example

  • 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)

Parameters

Name Type Description Notes
team_id str

Return type

List[RoleMappingOverview]

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

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]

get_teams

List[ApiTeam] get_teams()

Get all teams

Retrieve all user teams for the current tenant unit.

Example

  • 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)

Parameters

This endpoint does not need any parameter.

Return type

List[ApiTeam]

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

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_mapping

Mapping update_mapping(id, mapping)

Update mapping

For more information on groups please access the https://developer.ibm.com/apis/catalog/instana--instana-rest-api/Settings#groups.

Example

  • Api Key Authentication (ApiKeyAuth):
import instana_client
from instana_client.models.mapping import Mapping
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 = 'mappingId' # str | Id of the mapping to update
    mapping = {"id":"mappingId","key":"roles","value":"analyst","groupId":"-3","teamId":null} # Mapping | 

    try:
        # Update mapping
        api_response = api_instance.update_mapping(id, mapping)
        print("The response of TeamsApi->update_mapping:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TeamsApi->update_mapping: %s\n" % e)

Parameters

Name Type Description Notes
id str Id of the mapping to update
mapping Mapping

Return type

Mapping

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
412 Attempting to upsert a mapping containing a teamId - without teams being available -
422 invalid request body -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_team

update_team(id, api_team)

Update team

Update an existing team by ID.

Example

  • 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 = instana_client.ApiTeam() # ApiTeam | Team to update

    try:
        # Update team
        api_instance.update_team(id, api_team)
    except Exception as e:
        print("Exception when calling TeamsApi->update_team: %s\n" % e)

Parameters

Name Type Description Notes
id str Id of the team to update
api_team ApiTeam Team to update

Return type

void (empty response body)

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

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]