All URIs are relative to https://api.messente.com/v1.
Method | HTTP request | Description |
---|---|---|
createGroup() | POST /phonebook/groups | Creates a new group with the provided name |
deleteGroup() | DELETE /phonebook/groups/{groupId} | Deletes a group |
fetchGroup() | GET /phonebook/groups/{groupId} | Lists a group |
fetchGroups() | GET /phonebook/groups | Returns all groups |
updateGroup() | PUT /phonebook/groups/{groupId} | Updates a group with the provided name |
createGroup($groupName): \Messente\Api\Model\GroupEnvelope
Creates a new group with the provided name
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Messente\Api\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Messente\Api\Api\GroupsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$groupName = {"name":"Any group name"}; // \Messente\Api\Model\GroupName
try {
$result = $apiInstance->createGroup($groupName);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupsApi->createGroup: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
groupName | \Messente\Api\Model\GroupName |
\Messente\Api\Model\GroupEnvelope
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteGroup($groupId)
Deletes a group
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Messente\Api\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Messente\Api\Api\GroupsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$groupId = 5792a02a-e5c2-422b-a0a0-0ae65d814663; // string | String in UUID format
try {
$apiInstance->deleteGroup($groupId);
} catch (Exception $e) {
echo 'Exception when calling GroupsApi->deleteGroup: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
groupId | string | String in UUID format |
void (empty response body)
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
fetchGroup($groupId): \Messente\Api\Model\GroupEnvelope
Lists a group
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Messente\Api\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Messente\Api\Api\GroupsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$groupId = 5792a02a-e5c2-422b-a0a0-0ae65d814663; // string | String in UUID format
try {
$result = $apiInstance->fetchGroup($groupId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupsApi->fetchGroup: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
groupId | string | String in UUID format |
\Messente\Api\Model\GroupEnvelope
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
fetchGroups(): \Messente\Api\Model\GroupListEnvelope
Returns all groups
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Messente\Api\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Messente\Api\Api\GroupsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->fetchGroups();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupsApi->fetchGroups: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
\Messente\Api\Model\GroupListEnvelope
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateGroup($groupId, $groupName): \Messente\Api\Model\GroupEnvelope
Updates a group with the provided name
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Messente\Api\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Messente\Api\Api\GroupsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$groupId = 5792a02a-e5c2-422b-a0a0-0ae65d814663; // string | String in UUID format
$groupName = {"name":"Any group name"}; // \Messente\Api\Model\GroupName
try {
$result = $apiInstance->updateGroup($groupId, $groupName);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GroupsApi->updateGroup: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
groupId | string | String in UUID format | |
groupName | \Messente\Api\Model\GroupName |
\Messente\Api\Model\GroupEnvelope
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]