All URIs are relative to https://api.flat.io/v2
Method | HTTP request | Description |
---|---|---|
count_orga_users | GET /organizations/users/count | Count the organization users using the provided filters |
create_lti_credentials | POST /organizations/lti/credentials | Create a new couple of LTI 1.x credentials |
create_organization_invitation | POST /organizations/invitations | Create a new invitation to join the organization |
create_organization_user | POST /organizations/users | Create a new user account |
create_organization_user_access_token | POST /organizations/users/{user}/accessToken | Create a delegated API access token for an organization user |
create_organization_user_signin_link | POST /organizations/users/{user}/signinLink | Create a sign in link for an organization user |
list_lti_credentials | GET /organizations/lti/credentials | List LTI 1.x credentials |
list_organization_invitations | GET /organizations/invitations | List the organization invitations |
list_organization_users | GET /organizations/users | List the organization users |
remove_organization_invitation | DELETE /organizations/invitations/{invitation} | Remove an organization invitation |
remove_organization_user | DELETE /organizations/users/{user} | Remove an account from Flat |
revoke_lti_credentials | DELETE /organizations/lti/credentials/{credentials} | Revoke LTI 1.x credentials |
update_organization_user | PUT /organizations/users/{user} | Update account information |
List[UserDetailsAdmin] count_orga_users(role=role, q=q, group=group, no_active_license=no_active_license)
Count the organization users using the provided filters
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.user_details_admin import UserDetailsAdmin
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.OrganizationApi(api_client)
role = ['role_example'] # List[str] | Filter users by role (optional)
q = 'q_example' # str | The query to search (optional)
group = ['group_example'] # List[str] | Filter users by group (optional)
no_active_license = True # bool | Filter users who don't have an active license (optional)
try:
# Count the organization users using the provided filters
api_response = api_instance.count_orga_users(role=role, q=q, group=group, no_active_license=no_active_license)
print("The response of OrganizationApi->count_orga_users:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationApi->count_orga_users: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
role | List[str] | Filter users by role | [optional] |
q | str | The query to search | [optional] |
group | List[str] | Filter users by group | [optional] |
no_active_license | bool | Filter users who don't have an active license | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Number of users | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LtiCredentials create_lti_credentials(body)
Create a new couple of LTI 1.x credentials
Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our Developer Documentation.
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.lti_credentials import LtiCredentials
from flat_api.models.lti_credentials_creation import LtiCredentialsCreation
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.OrganizationApi(api_client)
body = flat_api.LtiCredentialsCreation() # LtiCredentialsCreation |
try:
# Create a new couple of LTI 1.x credentials
api_response = api_instance.create_lti_credentials(body)
print("The response of OrganizationApi->create_lti_credentials:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationApi->create_lti_credentials: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | LtiCredentialsCreation |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The LTI Credentials | - |
403 | Not admin of an organization | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OrganizationInvitation create_organization_invitation(body)
Create a new invitation to join the organization
This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property usedBy
will be directly filled with the uniquer identifier of the corresponding user.
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.organization_invitation import OrganizationInvitation
from flat_api.models.organization_invitation_creation import OrganizationInvitationCreation
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.OrganizationApi(api_client)
body = flat_api.OrganizationInvitationCreation() # OrganizationInvitationCreation |
try:
# Create a new invitation to join the organization
api_response = api_instance.create_organization_invitation(body)
print("The response of OrganizationApi->create_organization_invitation:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationApi->create_organization_invitation: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | OrganizationInvitationCreation |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | New invitation created | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserDetailsAdmin create_organization_user(body)
Create a new user account
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.user_creation import UserCreation
from flat_api.models.user_details_admin import UserDetailsAdmin
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.OrganizationApi(api_client)
body = flat_api.UserCreation() # UserCreation |
try:
# Create a new user account
api_response = api_instance.create_organization_user(body)
print("The response of OrganizationApi->create_organization_user:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationApi->create_organization_user: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | UserCreation |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | New user created | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiAccessToken create_organization_user_access_token(user, organization_user_access_token_creation)
Create a delegated API access token for an organization user
This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user.
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.api_access_token import ApiAccessToken
from flat_api.models.organization_user_access_token_creation import OrganizationUserAccessTokenCreation
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.OrganizationApi(api_client)
user = 'user_example' # str | Unique identifier of the Flat account
organization_user_access_token_creation = flat_api.OrganizationUserAccessTokenCreation() # OrganizationUserAccessTokenCreation |
try:
# Create a delegated API access token for an organization user
api_response = api_instance.create_organization_user_access_token(user, organization_user_access_token_creation)
print("The response of OrganizationApi->create_organization_user_access_token:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationApi->create_organization_user_access_token: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
user | str | Unique identifier of the Flat account | |
organization_user_access_token_creation | OrganizationUserAccessTokenCreation |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Created API access token | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserSigninLink create_organization_user_signin_link(user, user_signin_link_creation)
Create a sign in link for an organization user
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.user_signin_link import UserSigninLink
from flat_api.models.user_signin_link_creation import UserSigninLinkCreation
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.OrganizationApi(api_client)
user = 'user_example' # str | Unique identifier of the Flat account
user_signin_link_creation = flat_api.UserSigninLinkCreation() # UserSigninLinkCreation |
try:
# Create a sign in link for an organization user
api_response = api_instance.create_organization_user_signin_link(user, user_signin_link_creation)
print("The response of OrganizationApi->create_organization_user_signin_link:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationApi->create_organization_user_signin_link: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
user | str | Unique identifier of the Flat account | |
user_signin_link_creation | UserSigninLinkCreation |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Sign in link | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[LtiCredentials] list_lti_credentials()
List LTI 1.x credentials
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.lti_credentials import LtiCredentials
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.OrganizationApi(api_client)
try:
# List LTI 1.x credentials
api_response = api_instance.list_lti_credentials()
print("The response of OrganizationApi->list_lti_credentials:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationApi->list_lti_credentials: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The list of LTI Credentials | - |
403 | Not admin of an organization | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[OrganizationInvitation] list_organization_invitations(role=role, limit=limit, next=next, previous=previous)
List the organization invitations
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.organization_invitation import OrganizationInvitation
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.OrganizationApi(api_client)
role = 'role_example' # str | Filter users by role (optional)
limit = 50 # int | This is the maximum number of objects that may be returned (optional) (default to 50)
next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional)
previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional)
try:
# List the organization invitations
api_response = api_instance.list_organization_invitations(role=role, limit=limit, next=next, previous=previous)
print("The response of OrganizationApi->list_organization_invitations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationApi->list_organization_invitations: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
role | str | Filter users by role | [optional] |
limit | int | This is the maximum number of objects that may be returned | [optional] [default to 50] |
next | str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] |
previous | str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | List of invitations | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[UserDetailsAdmin] list_organization_users(sort=sort, direction=direction, next=next, previous=previous, role=role, q=q, group=group, no_active_license=no_active_license, license_expiration_date=license_expiration_date, only_ids=only_ids, limit=limit)
List the organization users
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.user_details_admin import UserDetailsAdmin
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.OrganizationApi(api_client)
sort = ['sort_example'] # List[str] | The order to sort the user list (optional)
direction = 'direction_example' # str | Sort direction (optional)
next = 'next_example' # str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional)
previous = 'previous_example' # str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. (optional)
role = ['role_example'] # List[str] | Filter users by role (optional)
q = 'q_example' # str | The query to search (optional)
group = ['group_example'] # List[str] | Filter users by group (optional)
no_active_license = True # bool | Filter users who don't have an active license (optional)
license_expiration_date = ['license_expiration_date_example'] # List[str] | Filter users by license expiration date or `active` / `notActive` (optional)
only_ids = True # bool | Return only user ids (optional)
limit = 25 # int | This is the maximum number of objects that may be returned (optional) (default to 25)
try:
# List the organization users
api_response = api_instance.list_organization_users(sort=sort, direction=direction, next=next, previous=previous, role=role, q=q, group=group, no_active_license=no_active_license, license_expiration_date=license_expiration_date, only_ids=only_ids, limit=limit)
print("The response of OrganizationApi->list_organization_users:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationApi->list_organization_users: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
sort | List[str] | The order to sort the user list | [optional] |
direction | str | Sort direction | [optional] |
next | str | An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] |
previous | str | An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the `Link` header when requesting the API. These URLs will contain a `next` and `previous` cursor based on the available data. | [optional] |
role | List[str] | Filter users by role | [optional] |
q | str | The query to search | [optional] |
group | List[str] | Filter users by group | [optional] |
no_active_license | bool | Filter users who don't have an active license | [optional] |
license_expiration_date | List[str] | Filter users by license expiration date or `active` / `notActive` | [optional] |
only_ids | bool | Return only user ids | [optional] |
limit | int | This is the maximum number of objects that may be returned | [optional] [default to 25] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | List of users | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
remove_organization_invitation(invitation)
Remove an organization invitation
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.OrganizationApi(api_client)
invitation = 'invitation_example' # str | Unique identifier of the invitation
try:
# Remove an organization invitation
api_instance.remove_organization_invitation(invitation)
except Exception as e:
print("Exception when calling OrganizationApi->remove_organization_invitation: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
invitation | str | Unique identifier of the invitation |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | The invitation has been removed | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
remove_organization_user(user, convert_to_individual=convert_to_individual)
Remove an account from Flat
This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information)
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.OrganizationApi(api_client)
user = 'user_example' # str | Unique identifier of the Flat account
convert_to_individual = True # bool | If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. (optional)
try:
# Remove an account from Flat
api_instance.remove_organization_user(user, convert_to_individual=convert_to_individual)
except Exception as e:
print("Exception when calling OrganizationApi->remove_organization_user: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
user | str | Unique identifier of the Flat account | |
convert_to_individual | bool | If `true`, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal. | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | User deleted | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
revoke_lti_credentials(credentials)
Revoke LTI 1.x credentials
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.OrganizationApi(api_client)
credentials = 'credentials_example' # str | Credentials unique identifier
try:
# Revoke LTI 1.x credentials
api_instance.revoke_lti_credentials(credentials)
except Exception as e:
print("Exception when calling OrganizationApi->revoke_lti_credentials: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
credentials | str | Credentials unique identifier |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | Credentials revoked | - |
403 | Not admin of an organization | - |
404 | Credentials not found | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserDetailsAdmin update_organization_user(user, body)
Update account information
- OAuth Authentication (OAuth2):
import flat_api
from flat_api.models.user_admin_update import UserAdminUpdate
from flat_api.models.user_details_admin import UserDetailsAdmin
from flat_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.flat.io/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = flat_api.Configuration(
host = "https://api.flat.io/v2"
)
# 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.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with flat_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = flat_api.OrganizationApi(api_client)
user = 'user_example' # str | Unique identifier of the Flat account
body = flat_api.UserAdminUpdate() # UserAdminUpdate |
try:
# Update account information
api_response = api_instance.update_organization_user(user, body)
print("The response of OrganizationApi->update_organization_user:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationApi->update_organization_user: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
user | str | Unique identifier of the Flat account | |
body | UserAdminUpdate |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | User updated | - |
0 | Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]