All URIs are relative to https://api.messente.com/v1
| Method | HTTP request | Description |
|---|---|---|
| create_group | POST /phonebook/groups | Creates a new group with the provided name |
| delete_group | DELETE /phonebook/groups/{groupId} | Deletes a group |
| fetch_group | GET /phonebook/groups/{groupId} | Lists a group |
| fetch_groups | GET /phonebook/groups | Returns all groups |
| update_group | PUT /phonebook/groups/{groupId} | Updates a group with the provided name |
GroupEnvelope create_group(group_name)
Creates a new group with the provided name
- Basic Authentication (basicAuth):
import messente_api
from messente_api.models.group_envelope import GroupEnvelope
from messente_api.models.group_name import GroupName
from messente_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.messente.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = messente_api.Configuration(
host = "https://api.messente.com/v1"
)
# 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 HTTP basic authorization: basicAuth
configuration = messente_api.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with messente_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = messente_api.GroupsApi(api_client)
group_name = {"name":"Any group name"} # GroupName |
try:
# Creates a new group with the provided name
api_response = api_instance.create_group(group_name)
print("The response of GroupsApi->create_group:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling GroupsApi->create_group: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| group_name | GroupName |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | An object containing a group object | - |
| 400 | Name is invalid string or shorter than length 1 | - |
| 401 | Unauthorized | - |
| 0 | General error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_group(group_id)
Deletes a group
- Basic Authentication (basicAuth):
import messente_api
from messente_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.messente.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = messente_api.Configuration(
host = "https://api.messente.com/v1"
)
# 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 HTTP basic authorization: basicAuth
configuration = messente_api.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with messente_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = messente_api.GroupsApi(api_client)
group_id = '5792a02a-e5c2-422b-a0a0-0ae65d814663' # str | String in UUID format
try:
# Deletes a group
api_instance.delete_group(group_id)
except Exception as e:
print("Exception when calling GroupsApi->delete_group: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| group_id | str | String in UUID format |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 204 | Group deleted | - |
| 401 | Unauthorized | - |
| 404 | Group missing | - |
| 0 | General error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GroupEnvelope fetch_group(group_id)
Lists a group
- Basic Authentication (basicAuth):
import messente_api
from messente_api.models.group_envelope import GroupEnvelope
from messente_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.messente.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = messente_api.Configuration(
host = "https://api.messente.com/v1"
)
# 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 HTTP basic authorization: basicAuth
configuration = messente_api.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with messente_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = messente_api.GroupsApi(api_client)
group_id = '5792a02a-e5c2-422b-a0a0-0ae65d814663' # str | String in UUID format
try:
# Lists a group
api_response = api_instance.fetch_group(group_id)
print("The response of GroupsApi->fetch_group:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling GroupsApi->fetch_group: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| group_id | str | String in UUID format |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | An object containing a group object | - |
| 401 | Unauthorized | - |
| 404 | Missing group | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GroupListEnvelope fetch_groups()
Returns all groups
- Basic Authentication (basicAuth):
import messente_api
from messente_api.models.group_list_envelope import GroupListEnvelope
from messente_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.messente.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = messente_api.Configuration(
host = "https://api.messente.com/v1"
)
# 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 HTTP basic authorization: basicAuth
configuration = messente_api.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with messente_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = messente_api.GroupsApi(api_client)
try:
# Returns all groups
api_response = api_instance.fetch_groups()
print("The response of GroupsApi->fetch_groups:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling GroupsApi->fetch_groups: %s\n" % e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | An object containing a list of group objects | - |
| 401 | Unauthorized | - |
| 0 | General error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GroupEnvelope update_group(group_id, group_name)
Updates a group with the provided name
- Basic Authentication (basicAuth):
import messente_api
from messente_api.models.group_envelope import GroupEnvelope
from messente_api.models.group_name import GroupName
from messente_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.messente.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = messente_api.Configuration(
host = "https://api.messente.com/v1"
)
# 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 HTTP basic authorization: basicAuth
configuration = messente_api.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with messente_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = messente_api.GroupsApi(api_client)
group_id = '5792a02a-e5c2-422b-a0a0-0ae65d814663' # str | String in UUID format
group_name = {"name":"Any group name"} # GroupName |
try:
# Updates a group with the provided name
api_response = api_instance.update_group(group_id, group_name)
print("The response of GroupsApi->update_group:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling GroupsApi->update_group: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| group_id | str | String in UUID format | |
| group_name | GroupName |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | An object containing a group object | - |
| 400 | Name is invalid string or shorter than length 1 | - |
| 401 | Unauthorized | - |
| 404 | Group missing | - |
| 0 | General error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]