Skip to content

Latest commit

 

History

History
638 lines (466 loc) · 24 KB

SsoApi.md

File metadata and controls

638 lines (466 loc) · 24 KB

bimdata_api_client.SsoApi

All URIs are relative to http://localhost

Method HTTP request Description
accept_invitation POST /identity-provider/invitation/{id}/accept Accept an invitation
create_user POST /identity-provider/user Create a user
delete_user DELETE /identity-provider/user Delete user from BIMData
deny_invitation POST /identity-provider/invitation/{id}/deny Deny an invitation
get_invitation GET /identity-provider/invitation/{id} Retrieve an invitation
get_invitations GET /identity-provider/invitation Retrieve all invitations

accept_invitation

accept_invitation(id)

Accept an invitation

If the user already exists, s·he is added to the cloud and projet. If not, we wait their first connection to add them. Required scopes: org:manage

Example

  • Api Key Authentication (ApiKey):
  • OAuth Authentication (BIMData_Connect):
  • OAuth Authentication (BIMData_Connect):
  • Api Key Authentication (Bearer):
import time
import bimdata_api_client
from bimdata_api_client.api import sso_api
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = bimdata_api_client.Configuration(
    host = "http://localhost"
)

# 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: ApiKey
configuration.api_key['ApiKey'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Configure OAuth2 access token for authorization: BIMData_Connect
configuration = bimdata_api_client.Configuration(
    host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Configure OAuth2 access token for authorization: BIMData_Connect
configuration = bimdata_api_client.Configuration(
    host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Configure API key authorization: Bearer
configuration.api_key['Bearer'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Bearer'] = 'Bearer'

# Enter a context with an instance of the API client
with bimdata_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sso_api.SsoApi(api_client)
    id = 1 # int | A unique integer value identifying this invitation.

    # example passing only required values which don't have defaults set
    try:
        # Accept an invitation
        api_instance.accept_invitation(id)
    except bimdata_api_client.ApiException as e:
        print("Exception when calling SsoApi->accept_invitation: %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this invitation.

Return type

void (empty response body)

Authorization

ApiKey, BIMData_Connect, BIMData_Connect, Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 No response body -
400 A required field is missing in the body -
401 The authentication failed. Your token may be expired, missing or malformed -
403 You don't have the authorization to access this resource. Check if the resource is exclusive to users or app (eg: /user is exclusive to users) or if your user has the right to access this resource. -
404 The resource does not exist or you don't have the right to see if the resource exists -
500 Something really bad happened. Check if your route is correct. By example: /cloud/[object Object]/project may raise a 500. An alert is automatically sent to us, we'll look at it shortly. -

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

create_user

ShortUser create_user(create_user_request)

Create a user

Create a user, linked to the provider. This route is only useful when used with ProjetAccessTokens. If user already exists, it responds with a 200 instead of a 201

Example

  • Api Key Authentication (ApiKey):
  • OAuth Authentication (BIMData_Connect):
  • OAuth Authentication (BIMData_Connect):
  • Api Key Authentication (Bearer):
import time
import bimdata_api_client
from bimdata_api_client.api import sso_api
from bimdata_api_client.model.create_user_request import CreateUserRequest
from bimdata_api_client.model.short_user import ShortUser
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = bimdata_api_client.Configuration(
    host = "http://localhost"
)

# 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: ApiKey
configuration.api_key['ApiKey'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Configure OAuth2 access token for authorization: BIMData_Connect
configuration = bimdata_api_client.Configuration(
    host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Configure OAuth2 access token for authorization: BIMData_Connect
configuration = bimdata_api_client.Configuration(
    host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Configure API key authorization: Bearer
configuration.api_key['Bearer'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Bearer'] = 'Bearer'

# Enter a context with an instance of the API client
with bimdata_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sso_api.SsoApi(api_client)
    create_user_request = CreateUserRequest(
        email="email_example",
        firstname="firstname_example",
        lastname="lastname_example",
        profile_picture="profile_picture_example",
    ) # CreateUserRequest | 

    # example passing only required values which don't have defaults set
    try:
        # Create a user
        api_response = api_instance.create_user(create_user_request)
        pprint(api_response)
    except bimdata_api_client.ApiException as e:
        print("Exception when calling SsoApi->create_user: %s\n" % e)

Parameters

Name Type Description Notes
create_user_request CreateUserRequest

Return type

ShortUser

Authorization

ApiKey, BIMData_Connect, BIMData_Connect, Bearer

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 -
201 -
400 A required field is missing in the body -
401 The authentication failed. Your token may be expired, missing or malformed -
403 You don't have the authorization to access this resource. Check if the resource is exclusive to users or app (eg: /user is exclusive to users) or if your user has the right to access this resource. -
500 Something really bad happened. Check if your route is correct. By example: /cloud/[object Object]/project may raise a 500. An alert is automatically sent to us, we'll look at it shortly. -

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

delete_user

delete_user(select_user_request)

Delete user from BIMData

Delete the user and all clouds where the user is alone

Example

  • Api Key Authentication (ApiKey):
  • OAuth Authentication (BIMData_Connect):
  • OAuth Authentication (BIMData_Connect):
  • Api Key Authentication (Bearer):
import time
import bimdata_api_client
from bimdata_api_client.api import sso_api
from bimdata_api_client.model.select_user_request import SelectUserRequest
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = bimdata_api_client.Configuration(
    host = "http://localhost"
)

# 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: ApiKey
configuration.api_key['ApiKey'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Configure OAuth2 access token for authorization: BIMData_Connect
configuration = bimdata_api_client.Configuration(
    host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Configure OAuth2 access token for authorization: BIMData_Connect
configuration = bimdata_api_client.Configuration(
    host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Configure API key authorization: Bearer
configuration.api_key['Bearer'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Bearer'] = 'Bearer'

# Enter a context with an instance of the API client
with bimdata_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sso_api.SsoApi(api_client)
    select_user_request = SelectUserRequest(
        email="email_example",
    ) # SelectUserRequest | 

    # example passing only required values which don't have defaults set
    try:
        # Delete user from BIMData
        api_instance.delete_user(select_user_request)
    except bimdata_api_client.ApiException as e:
        print("Exception when calling SsoApi->delete_user: %s\n" % e)

Parameters

Name Type Description Notes
select_user_request SelectUserRequest

Return type

void (empty response body)

Authorization

ApiKey, BIMData_Connect, BIMData_Connect, Bearer

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 No response body -
400 A required field is missing in the body -
401 The authentication failed. Your token may be expired, missing or malformed -
403 You don't have the authorization to access this resource. Check if the resource is exclusive to users or app (eg: /user is exclusive to users) or if your user has the right to access this resource. -
500 Something really bad happened. Check if your route is correct. By example: /cloud/[object Object]/project may raise a 500. An alert is automatically sent to us, we'll look at it shortly. -

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

deny_invitation

deny_invitation(id)

Deny an invitation

The invitation status change to DENIED and the user is not added to the cloud. You can accept an invitation previously denied Required scopes: org:manage

Example

  • Api Key Authentication (ApiKey):
  • OAuth Authentication (BIMData_Connect):
  • OAuth Authentication (BIMData_Connect):
  • Api Key Authentication (Bearer):
import time
import bimdata_api_client
from bimdata_api_client.api import sso_api
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = bimdata_api_client.Configuration(
    host = "http://localhost"
)

# 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: ApiKey
configuration.api_key['ApiKey'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Configure OAuth2 access token for authorization: BIMData_Connect
configuration = bimdata_api_client.Configuration(
    host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Configure OAuth2 access token for authorization: BIMData_Connect
configuration = bimdata_api_client.Configuration(
    host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Configure API key authorization: Bearer
configuration.api_key['Bearer'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Bearer'] = 'Bearer'

# Enter a context with an instance of the API client
with bimdata_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sso_api.SsoApi(api_client)
    id = 1 # int | A unique integer value identifying this invitation.

    # example passing only required values which don't have defaults set
    try:
        # Deny an invitation
        api_instance.deny_invitation(id)
    except bimdata_api_client.ApiException as e:
        print("Exception when calling SsoApi->deny_invitation: %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this invitation.

Return type

void (empty response body)

Authorization

ApiKey, BIMData_Connect, BIMData_Connect, Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 No response body -
400 A required field is missing in the body -
401 The authentication failed. Your token may be expired, missing or malformed -
403 You don't have the authorization to access this resource. Check if the resource is exclusive to users or app (eg: /user is exclusive to users) or if your user has the right to access this resource. -
404 The resource does not exist or you don't have the right to see if the resource exists -
500 Something really bad happened. Check if your route is correct. By example: /cloud/[object Object]/project may raise a 500. An alert is automatically sent to us, we'll look at it shortly. -

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

get_invitation

Invitation get_invitation(id)

Retrieve an invitation

Retrieve all invitations of your identity provider Required scopes: org:manage

Example

  • Api Key Authentication (ApiKey):
  • OAuth Authentication (BIMData_Connect):
  • OAuth Authentication (BIMData_Connect):
  • Api Key Authentication (Bearer):
import time
import bimdata_api_client
from bimdata_api_client.api import sso_api
from bimdata_api_client.model.invitation import Invitation
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = bimdata_api_client.Configuration(
    host = "http://localhost"
)

# 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: ApiKey
configuration.api_key['ApiKey'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Configure OAuth2 access token for authorization: BIMData_Connect
configuration = bimdata_api_client.Configuration(
    host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Configure OAuth2 access token for authorization: BIMData_Connect
configuration = bimdata_api_client.Configuration(
    host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Configure API key authorization: Bearer
configuration.api_key['Bearer'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Bearer'] = 'Bearer'

# Enter a context with an instance of the API client
with bimdata_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sso_api.SsoApi(api_client)
    id = 1 # int | A unique integer value identifying this invitation.

    # example passing only required values which don't have defaults set
    try:
        # Retrieve an invitation
        api_response = api_instance.get_invitation(id)
        pprint(api_response)
    except bimdata_api_client.ApiException as e:
        print("Exception when calling SsoApi->get_invitation: %s\n" % e)

Parameters

Name Type Description Notes
id int A unique integer value identifying this invitation.

Return type

Invitation

Authorization

ApiKey, BIMData_Connect, BIMData_Connect, Bearer

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -
401 The authentication failed. Your token may be expired, missing or malformed -
403 You don't have the authorization to access this resource. Check if the resource is exclusive to users or app (eg: /user is exclusive to users) or if your user has the right to access this resource. -
404 The resource does not exist or you don't have the right to see if the resource exists -
500 Something really bad happened. Check if your route is correct. By example: /cloud/[object Object]/project may raise a 500. An alert is automatically sent to us, we'll look at it shortly. -

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

get_invitations

[Invitation] get_invitations()

Retrieve all invitations

Retrieve all invitations of your identity provider Required scopes: org:manage

Example

  • Api Key Authentication (ApiKey):
  • OAuth Authentication (BIMData_Connect):
  • OAuth Authentication (BIMData_Connect):
  • Api Key Authentication (Bearer):
import time
import bimdata_api_client
from bimdata_api_client.api import sso_api
from bimdata_api_client.model.invitation import Invitation
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = bimdata_api_client.Configuration(
    host = "http://localhost"
)

# 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: ApiKey
configuration.api_key['ApiKey'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Configure OAuth2 access token for authorization: BIMData_Connect
configuration = bimdata_api_client.Configuration(
    host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Configure OAuth2 access token for authorization: BIMData_Connect
configuration = bimdata_api_client.Configuration(
    host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Configure API key authorization: Bearer
configuration.api_key['Bearer'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Bearer'] = 'Bearer'

# Enter a context with an instance of the API client
with bimdata_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sso_api.SsoApi(api_client)
    status = "A" # str |          A: Accepted         D: Denied         P: Pending           * `A` - accepted * `D` - denied * `P` - pending (optional)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # Retrieve all invitations
        api_response = api_instance.get_invitations(status=status)
        pprint(api_response)
    except bimdata_api_client.ApiException as e:
        print("Exception when calling SsoApi->get_invitations: %s\n" % e)

Parameters

Name Type Description Notes
status str A: Accepted D: Denied P: Pending * `A` - accepted * `D` - denied * `P` - pending [optional]

Return type

[Invitation]

Authorization

ApiKey, BIMData_Connect, BIMData_Connect, Bearer

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -
401 The authentication failed. Your token may be expired, missing or malformed -
403 You don't have the authorization to access this resource. Check if the resource is exclusive to users or app (eg: /user is exclusive to users) or if your user has the right to access this resource. -
500 Something really bad happened. Check if your route is correct. By example: /cloud/[object Object]/project may raise a 500. An alert is automatically sent to us, we'll look at it shortly. -

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